Fix an issue with dexie observable change helper
This commit is contained in:
parent
653dc2b963
commit
3b3e9fba97
@ -30,8 +30,8 @@
|
||||
"konva": "^7.2.5",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.omit": "^4.5.0",
|
||||
"lodash.set": "^4.3.2",
|
||||
"lodash.unset": "^4.5.2",
|
||||
"normalize-wheel": "^1.0.1",
|
||||
"pepjs": "^0.5.3",
|
||||
"polygon-clipping": "^0.15.2",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import set from "lodash.set";
|
||||
import unset from "lodash.unset";
|
||||
import omit from "lodash.omit";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
|
||||
export function applyObservableChange(change) {
|
||||
@ -10,7 +10,7 @@ export function applyObservableChange(change) {
|
||||
const changes = Object.entries(change.mods).reverse();
|
||||
for (let [key, value] of changes) {
|
||||
if (value === null) {
|
||||
unset(obj, key);
|
||||
obj = omit(obj, [key]);
|
||||
} else {
|
||||
obj = set(obj, key, value);
|
||||
}
|
||||
|
10
yarn.lock
10
yarn.lock
@ -8591,6 +8591,11 @@ lodash.memoize@^4.1.2:
|
||||
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
|
||||
integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
|
||||
|
||||
lodash.omit@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60"
|
||||
integrity sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=
|
||||
|
||||
lodash.set@^4.3.2:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
|
||||
@ -8626,11 +8631,6 @@ lodash.uniq@^4.5.0:
|
||||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
|
||||
|
||||
lodash.unset@^4.5.2:
|
||||
version "4.5.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.unset/-/lodash.unset-4.5.2.tgz#370d1d3e85b72a7e1b0cdf2d272121306f23e4ed"
|
||||
integrity sha1-Nw0dPoW3Kn4bDN8tJyEhMG8j5O0=
|
||||
|
||||
"lodash@>=3.5 <5", lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.5:
|
||||
version "4.17.20"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
||||
|
Loading…
Reference in New Issue
Block a user