Skip to content

Commit

Permalink
fix(web): fix type error (#1377)
Browse files Browse the repository at this point in the history
* fix(web): Type error "strict"

* fix(web): fix type error

---------

Co-authored-by: 0fatal <2816813070@qq.com>
  • Loading branch information
NMTuan and 0fatal committed Jul 10, 2023
1 parent d076b97 commit d15963d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
24 changes: 21 additions & 3 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions web/src/pages/app/database/service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import parse from "ejson-shell-parser";
import parse, { ParseMode } from "ejson-shell-parser";
import { t } from "i18next";

import useDBMStore from "./store";
Expand Down Expand Up @@ -54,7 +54,9 @@ export const useEntryDataQuery = (params: any, onSuccess: (data: any) => void) =
return { _id: q };
}
try {
return parse(q, { mode: "strict" });
return parse(q, {
mode: ParseMode.Strict,
});
} catch (err) {}
};
const query = _id ? parse_query(_id) : {};
Expand Down

0 comments on commit d15963d

Please sign in to comment.