Skip to content

Commit baa0090

Browse files
Update packages/snaps-rpc-methods/src/permitted/setState.ts
Co-authored-by: Frederik Bolding <[email protected]>
1 parent bc395c1 commit baa0090

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/snaps-rpc-methods/src/permitted/setState.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ export function set(
245245
currentObject[currentKey] === null
246246
) {
247247
currentObject[currentKey] = {};
248-
}
249-
250-
if (!isObject(currentObject[currentKey])) {
248+
} else if (!isObject(currentObject[currentKey])) {
251249
throw rpcErrors.invalidParams(
252250
'Invalid params: Cannot overwrite non-object value.',
253251
);

0 commit comments

Comments
 (0)