allow using whitelisted globals themselves in tags

pull/350/head
Conduitry 9 years ago
parent 2c58e39ed4
commit 5984d98618

@ -99,7 +99,7 @@ export default class Generator {
if ( globalWhitelist[ name ] ) { if ( globalWhitelist[ name ] ) {
code.prependRight( node.start, `( '${name}' in root ? root.` ); code.prependRight( node.start, `( '${name}' in root ? root.` );
code.appendLeft( node.object.end, ` : ${name} )` ); code.appendLeft( node.object ? node.object.end : node.end, ` : ${name} )` );
} else { } else {
code.prependRight( node.start, `root.` ); code.prependRight( node.start, `root.` );
} }
@ -361,4 +361,3 @@ export default class Generator {
if ( visitor.leave ) visitor.leave( this, node ); if ( visitor.leave ) visitor.leave( this, node );
} }
} }

Loading…
Cancel
Save