You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using dexie-observable under node.js through fake-indexeddb. Through a series of events it ends up calling put on an object with a save prototype method, which fails because lodash's isPlainObject returns false:
}elseif(!isPlainObject(input)){// This is way too restrictive. Should be able to clone any object that isn't// a platform object with an internal slot other than [[Prototype]] or [[Extensible]].// But need to reject all platform objects, except those whitelisted for cloning// (ie, those with a [[Clone]] internal method), and this errs on the side of caution// for now.// Supposed to also handle FileList, ImageData, ImageBitmap, but fuck itthrownewDataCloneError();}else{
According to the structured clone algorithm this should be ok- the object will be duplicated but "The prototype chain does not get walked and duplicated".
For comparison, Chrome's IndexedDB implementation allows the object to be saved.
I'm using
dexie-observable
under node.js throughfake-indexeddb
. Through a series of events it ends up callingput
on an object with asave
prototype method, which fails because lodash'sisPlainObject
returns false:According to the structured clone algorithm this should be ok- the object will be duplicated but "The prototype chain does not get walked and duplicated".
For comparison, Chrome's IndexedDB implementation allows the object to be saved.
reference: dexie/Dexie.js#647
The text was updated successfully, but these errors were encountered: