Skip to content

Commit a17ae28

Browse files
committed
allow child vms access to parent's options
1 parent 48e68c1 commit a17ae28

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/compiler.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,13 @@ CompilerProto.markComputed = function (binding) {
539539
* Retrive an option from the compiler
540540
*/
541541
CompilerProto.getOption = function (type, id) {
542-
var opts = this.options
543-
return (opts[type] && opts[type][id]) || (utils[type] && utils[type][id])
542+
var opts = this.options,
543+
parent = this.parentCompiler
544+
return (opts[type] && opts[type][id]) || (
545+
parent
546+
? parent.getOption(type, id)
547+
: utils[type] && utils[type][id]
548+
)
544549
}
545550

546551
/**

0 commit comments

Comments
 (0)