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 {
178178 * Interprets value as either a primitive, or if a fact, retrieves the fact value
179179 */
180180 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' }
182182 return this . factValue ( value . fact , value . params , value . path )
183183 }
184184 return Promise . resolve ( value )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export default class RuleResult {
1616 }
1717
1818 resolveEventParams ( almanac ) {
19- if ( this . event . params instanceof Object ) {
19+ if ( this . event . params !== null && typeof this . event . params === 'object' ) {
2020 const updates = [ ]
2121 for ( const key in this . event . params ) {
2222 if ( Object . prototype . hasOwnProperty . call ( this . event . params , key ) ) {
You can’t perform that action at this time.
0 commit comments