small tweak, possibly ahead of a much larger one

pull/992/head
Rich Harris 8 years ago
parent e974fdc40b
commit a72a6ca476

@ -201,7 +201,8 @@ export default class Generator {
} }
contextualise( contextualise(
block: DomBlock | SsrBlock, contexts: Map<string, string>,
indexes: Map<string, string>,
expression: Node, expression: Node,
context: string, context: string,
isEventHandler: boolean isEventHandler: boolean
@ -215,7 +216,6 @@ export default class Generator {
const usedIndexes: Set<string> = new Set(); const usedIndexes: Set<string> = new Set();
const { code, helpers } = this; const { code, helpers } = this;
const { contexts, indexes } = block;
let scope: Scope; let scope: Scope;
let lexicalDepth = 0; let lexicalDepth = 0;

@ -164,12 +164,7 @@ export default class Block {
} }
contextualise(expression: Node, context?: string, isEventHandler?: boolean) { contextualise(expression: Node, context?: string, isEventHandler?: boolean) {
return this.generator.contextualise( return this.generator.contextualise(this.contexts, this.indexes, expression, context, isEventHandler);
this,
expression,
context,
isEventHandler
);
} }
mount(name: string, parentNode: string) { mount(name: string, parentNode: string) {

@ -44,11 +44,6 @@ export default class Block {
} }
contextualise(expression: Node, context?: string, isEventHandler?: boolean) { contextualise(expression: Node, context?: string, isEventHandler?: boolean) {
return this.generator.contextualise( return this.generator.contextualise(this.contexts, this.indexes, expression, context, isEventHandler);
this,
expression,
context,
isEventHandler
);
} }
} }

Loading…
Cancel
Save