File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,13 @@ export default class Ref {
1818 this . prefix = prefix ;
1919 this . isContext = key . indexOf ( prefix ) === 0
2020 this . path = this . isContext ? this . key . slice ( this . prefix . length ) : this . key
21- this . _get = getter ( this . path )
21+ this . _get = getter ( this . path , true )
2222 this . map = mapFn || ( value => value ) ;
2323 }
2424
2525 getValue ( parent , context ) {
2626 let isContext = this . isContext
27-
28- if ( ( isContext && ! context ) || ( ! isContext && ! context && ! parent ) )
29- throw new Error ( 'missing the context necessary to cast this value' )
30-
31- let value = this . _get ( isContext ? context : ( parent || context ) )
32-
27+ let value = this . _get ( isContext ? context : ( parent || context ) || { } )
3328 return this . map ( value )
3429 }
3530}
You can’t perform that action at this time.
0 commit comments