Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 8, 2024
1 parent db801f1 commit 7a5a910
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/dict.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class Dict {
const entries = await this._client.hGetAll(this._key);
return Object.entries(entries).map(([key, value]) => {
const parsedValue = JSON.parse(value);

if (typeof parsedValue === "string") {
if (parsedValue.startsWith("znsocket.List:")) {
const refKey = parsedValue.split(/:(.+)/)[1];
Expand All @@ -142,7 +142,7 @@ export class Dict {
return [key, new Dict({ client: this._client, socket: this._socket, key: refKey })];
}
}

return [key, parsedValue];
});
}
Expand Down
2 changes: 1 addition & 1 deletion js_tests/native.dict.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ test("native_dict_to_object", async () => {
const obj = await dct2.toObject();
expect(obj).toEqual({ dict: { Hello: "World" } });

});
});

0 comments on commit 7a5a910

Please sign in to comment.