fix transitions in dev mode

pull/1903/head
Rich Harris 6 years ago
parent f3c5521f80
commit df64c5da23

@ -632,7 +632,7 @@ export default class ElementWrapper extends Wrapper {
const fn = component.qualify(intro.name);
block.builders.intro.addConditional(`@intro.enabled`, deindent`
block.builders.intro.addConditional(`@intros.enabled`, deindent`
if (${name}) ${name}.invalidate();
@add_render_callback(() => {
@ -669,7 +669,7 @@ export default class ElementWrapper extends Wrapper {
`);
}
block.builders.intro.addConditional(`@intro.enabled`, deindent`
block.builders.intro.addConditional(`@intros.enabled`, deindent`
@add_render_callback(() => {
${introName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, true);
${introName}.run(1);

@ -1,4 +1,4 @@
import { add_render_callback, flush, intro, schedule_update } from './scheduler.js';
import { add_render_callback, flush, intros, schedule_update } from './scheduler.js';
import { current_component, set_current_component } from './lifecycle.js'
import { is_function, run, run_all, noop } from './utils.js';
import { blankObject } from './utils.js';
@ -101,7 +101,7 @@ export function init(component, options, instance, create_fragment, not_equal) {
$$.fragment = create_fragment(component, $$.ctx);
if (options.target) {
intro.enabled = !!options.intro;
intros.enabled = !!options.intro;
if (options.hydrate) {
$$.fragment.l(children(options.target));
@ -111,7 +111,7 @@ export function init(component, options, instance, create_fragment, not_equal) {
mount_component(component, options.target, options.anchor);
flush();
intro.enabled = true;
intros.enabled = true;
}
set_current_component(previous_component);

@ -6,7 +6,7 @@ let dirty_components = [];
const binding_callbacks = [];
const render_callbacks = [];
export const intro = { enabled: false };
export const intros = { enabled: false };
export function schedule_update(component) {
dirty_components.push(component);

Loading…
Cancel
Save