We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cd72e0 commit 088865eCopy full SHA for 088865e
rita-core/src/logicElements/Atom.ts
@@ -56,12 +56,17 @@ export class Atom extends Formula {
56
const a = path.split('.');
57
for (let i = 0, n = a.length; i < n; ++i) {
58
const k = a[i];
59
- if (typeof object === 'undefined') {
+ if (typeof object !== 'object') {
60
if (defaultVal !== undefined) {
61
return defaultVal;
62
} else {
63
throw new UndefinedPathError(
64
- 'Undefinded path in data: ' + path,
+ 'Invalid path in data: ' +
65
+ path +
66
+ ' is of invalid type ' +
67
+ typeof object +
68
+ ' with value ' +
69
+ object,
70
context
71
);
72
}
0 commit comments