Commit 9d70a7b 1 parent 594fa53 commit 9d70a7b Copy full SHA for 9d70a7b
File tree 1 file changed +2
-7
lines changed
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 {
18
18
this . prefix = prefix ;
19
19
this . isContext = key . indexOf ( prefix ) === 0
20
20
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 )
22
22
this . map = mapFn || ( value => value ) ;
23
23
}
24
24
25
25
getValue ( parent , context ) {
26
26
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 ) || { } )
33
28
return this . map ( value )
34
29
}
35
30
}
You can’t perform that action at this time.
0 commit comments