Skip to content

Commit

Permalink
Merge branch 'feature/1524-hh-consent-question' of github.com:akvo/rt…
Browse files Browse the repository at this point in the history
…mis into feature/1524-hh-consent-question
  • Loading branch information
jkisioh committed Jun 26, 2024
2 parents 94c7486 + a9fda3e commit 4238b86
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "rtmis-mobile",
"slug": "rtmis-mobile",
"version": "4.0.8",
"version": "4.0.9",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
Expand All @@ -21,7 +21,7 @@
"backgroundColor": "#ffffff"
},
"package": "com.akvo.rtmis",
"versionCode": 408
"versionCode": 409
},
"web": {
"favicon": "./assets/favicon.png"
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rtmis-mobile",
"version": "4.0.8",
"version": "4.0.9",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start --port 19000",
Expand Down
2 changes: 1 addition & 1 deletion app/src/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dataSyncInterval": 30,
"errorHandling": true,
"loggingLevel": "verbose",
"appVersion": "4.0.8",
"appVersion": "4.0.9",
"lang": "en",
"gpsThreshold": 30
}
12 changes: 8 additions & 4 deletions app/src/form/fields/TypeAutofield.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,14 @@ const fixIncompleteMathOperation = (expression) => {
};

const strToFunction = (fnString, values) => {
const fnStr = checkDirty(fnString);
const fnBody = fixIncompleteMathOperation(generateFnBody(fnStr, values));
// eslint-disable-next-line no-new-func
return new Function(`return ${fnBody}`);
try {
const fnStr = checkDirty(fnString);
const fnBody = fixIncompleteMathOperation(generateFnBody(fnStr, values));
// eslint-disable-next-line no-new-func
return new Function(`return ${fnBody}`);
} catch (error) {
return null;
}
};

const TypeAutofield = ({
Expand Down

0 comments on commit 4238b86

Please sign in to comment.