pull/4095/head
Conduitry 6 years ago
parent 8748c852ee
commit cd135f934c

@ -1,7 +1,7 @@
import Renderer from './Renderer'; import Renderer from './Renderer';
import Wrapper from './wrappers/shared/Wrapper'; import Wrapper from './wrappers/shared/Wrapper';
import { b, x } from 'code-red'; import { b, x } from 'code-red';
import { Node, Identifier, ArrayPattern } from 'estree'; import { Node, Identifier } from 'estree';
import { is_head } from './wrappers/shared/is_head'; import { is_head } from './wrappers/shared/is_head';
export interface BlockOptions { export interface BlockOptions {
@ -301,9 +301,7 @@ export default class Block {
} else { } else {
const ctx = this.maintain_context ? x`#new_ctx` : x`#ctx`; const ctx = this.maintain_context ? x`#new_ctx` : x`#ctx`;
let dirty: Identifier | ArrayPattern = { type: 'Identifier', name: '#dirty' }; properties.update = x`function #update(${ctx}, #dirty) {
properties.update = x`function #update(${ctx}, ${dirty}) {
${this.maintain_context && b`#ctx = ${ctx};`} ${this.maintain_context && b`#ctx = ${ctx};`}
${this.chunks.update} ${this.chunks.update}
}`; }`;

Loading…
Cancel
Save