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

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

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

Loading…
Cancel
Save