mirror of
https://github.com/wekan/wekan.git
synced 2025-12-30 22:28:49 +01:00
Add new has operator for searching
This commit is contained in:
parent
c02b71e0e1
commit
726be664c8
4 changed files with 43 additions and 2 deletions
|
|
@ -134,7 +134,10 @@ SessionData.helpers({
|
|||
|
||||
SessionData.unpickle = pickle => {
|
||||
return JSON.parse(pickle, (key, value) => {
|
||||
if (typeof value === 'object') {
|
||||
if (value === null) {
|
||||
return null;
|
||||
} else if (typeof value === 'object') {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (value.hasOwnProperty('$$class')) {
|
||||
if (value.$$class === 'RegExp') {
|
||||
return new RegExp(value.source, value.flags);
|
||||
|
|
@ -147,7 +150,9 @@ SessionData.unpickle = pickle => {
|
|||
|
||||
SessionData.pickle = value => {
|
||||
return JSON.stringify(value, (key, value) => {
|
||||
if (typeof value === 'object') {
|
||||
if (value === null) {
|
||||
return null;
|
||||
} else if (typeof value === 'object') {
|
||||
if (value.constructor.name === 'RegExp') {
|
||||
return {
|
||||
$$class: 'RegExp',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue