Closed jacobq closed 6 years ago
We use $.extend()
right now to deep-clone options. But I guess this would be easy to refactor - I'll take a stab when I find some time. I would also accept a PR for that :)
I wasn't even going that far -- just saying that you could remove it from addon/adapters/indexed-db.js
without any other changes.
That is not true, it is indeed used here: https://github.com/mydea/ember-indexeddb/blob/master/addon/adapters/indexed-db.js#L266
let record = $.extend(true, {}, data.data);
:man_facepalming: You're right; I'm sorry. Scanning through with Ctrl+F I only saw the template usages.
No worries ;)
FWIW, _.cloneDeep
offers the same functionality (I believe) and can be brought in on its own.
BTW, I have since replaced this with a non-jQuery version, so this addon is now jQuery free.
I haven't looked through other files yet, but I noticed that
jQuery
is imported here but apparently not used. https://github.com/mydea/ember-indexeddb/blob/master/addon/adapters/indexed-db.js#L6