Skip to content

Commit 99d9968

Browse files
committed
chore(store): prefer Object.keys over Object.entries
1 parent 2b77a28 commit 99d9968

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/store/src/generator-helpers.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,14 @@ export function generatedUpdateHelper(entity, input) {
287287
hasSet: false,
288288
};
289289

290-
for (const [key, updateSpec] of Object.entries(input.update)) {
290+
for (const key of Object.keys(input.update)) {
291291
// Can't update 'undefined', needs to be 'null' if allowed
292-
if (updateSpec === undefined) {
292+
if (input.update[key] === undefined) {
293293
continue;
294294
}
295295

296+
const updateSpec = input.update[key];
297+
296298
// isPlainObject equivalent, but handling Object.create(null)
297299
if (
298300
!(

0 commit comments

Comments
 (0)