File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export default class Almanac {
178
178
* Interprets value as either a primitive, or if a fact, retrieves the fact value
179
179
*/
180
180
getValue ( value ) {
181
- if ( Boolean ( value instanceof Object ) && Object . prototype . hasOwnProperty . call ( value , 'fact' ) ) { // value = { fact: 'xyz' }
181
+ if ( value != null && typeof value === 'object' && Object . prototype . hasOwnProperty . call ( value , 'fact' ) ) { // value = { fact: 'xyz' }
182
182
return this . factValue ( value . fact , value . params , value . path )
183
183
}
184
184
return Promise . resolve ( value )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export default class RuleResult {
16
16
}
17
17
18
18
resolveEventParams ( almanac ) {
19
- if ( this . event . params instanceof Object ) {
19
+ if ( this . event . params !== null && typeof this . event . params === 'object' ) {
20
20
const updates = [ ]
21
21
for ( const key in this . event . params ) {
22
22
if ( Object . prototype . hasOwnProperty . call ( this . event . params , key ) ) {
You can’t perform that action at this time.
0 commit comments