Skip to content

Commit

Permalink
fix: updated mathJS package version && improved number check
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan authored and bpedersen2 committed Oct 25, 2023
1 parent e7ef99a commit 012de1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"handlebars": "^4.7.7",
"lodash": "^4.17.21",
"luxon": "^3.2.1",
"mathjs": "^11.4.0",
"mathjs": "^11.11.2",
"migrate-mongo": "^11.0.0",
"mongoose": "^7.4.3",
"node-fetch": "^3.3.0",
Expand Down Expand Up @@ -124,8 +124,7 @@
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"transformIgnorePatterns": [
],
"transformIgnorePatterns": [],
"collectCoverageFrom": [
"**/*.(t|j)s"
],
Expand Down
5 changes: 2 additions & 3 deletions src/elastic-search/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ export const transformKeysInObject = (obj: Record<string, unknown>) => {
for (const [key, value] of Object.entries(obj)) {
const newKey = transformKey(key);

const isNumberValueType = Number.isInteger(
(value as Record<string, unknown>)?.value,
);
const isNumberValueType =
typeof (value as Record<string, unknown>)?.value === "number";
if (isNumberValueType) {
(value as Record<string, unknown>)["value_type"] = "number";
} else {
Expand Down

0 comments on commit 012de1a

Please sign in to comment.