Skip to content

Commit 047bc89

Browse files
authored
Merge pull request #47 from educorvi/develop
Update
2 parents 2cd72e0 + c787feb commit 047bc89

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

.github/workflows/build_test_release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
push:
88
branches: ['main', 'develop']
99
pull_request:
10-
branches: ['main', 'develop']
10+
branches: ['develop']
1111

1212
jobs:
1313
buildAndTest:

.run/Rita-Core.run.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Rita-Core" type="JavaScriptTestRunnerJest">
33
<config-file value="$PROJECT_DIR$/rita-core/jest.config.js" />
4-
<node-interpreter value="$USER_HOME$/.nvm/versions/node/v18.12.1/bin/node" />
5-
<node-options value="" />
4+
<node-interpreter value="project" />
65
<jest-package value="$PROJECT_DIR$/rita-core/node_modules/jest" />
76
<working-dir value="$PROJECT_DIR$/rita-core" />
87
<jest-options value="--maxWorkers=8" />

.run/Rita-SMT.run.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Rita-SMT" type="JavaScriptTestRunnerJest">
33
<config-file value="$PROJECT_DIR$/rita-smt/main/jest.config.js" />
4-
<node-interpreter value="$USER_HOME$/.nvm/versions/node/v18.12.1/bin/node" />
5-
<node-options value="" />
4+
<node-interpreter value="project" />
65
<jest-package value="$PROJECT_DIR$/persistent-rita/node_modules/jest" />
76
<working-dir value="$PROJECT_DIR$/rita-smt/main" />
87
<envs />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@educorvi/rita",
5+
"comment": "Improve error message for invalid type in data",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@educorvi/rita"
10+
}

rita-core/src/logicElements/Atom.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,17 @@ export class Atom extends Formula {
5656
const a = path.split('.');
5757
for (let i = 0, n = a.length; i < n; ++i) {
5858
const k = a[i];
59-
if (typeof object === 'undefined') {
59+
if (typeof object !== 'object') {
6060
if (defaultVal !== undefined) {
6161
return defaultVal;
6262
} else {
6363
throw new UndefinedPathError(
64-
'Undefinded path in data: ' + path,
64+
'Invalid path in data: ' +
65+
path +
66+
' is of invalid type ' +
67+
typeof object +
68+
' with value ' +
69+
object,
6570
context
6671
);
6772
}

0 commit comments

Comments
 (0)