refix fixtures

pull/4419/head
swyx 6 years ago
parent 054453bdc5
commit 8e01d06db0

@ -377,12 +377,9 @@ export default class EachBlockWrapper extends Wrapper {
block.chunks.init.push(b`
const ${get_key} = #ctx => ${this.node.key.manipulate(block)};
${this.renderer.options.dev &&
b`@validate_each_keys(#ctx, ${this.vars.each_block_value}, ${this.vars.get_each_context}, ${get_key});`}
${this.renderer.options.dev && b`@validate_each_keys(#ctx, ${this.vars.each_block_value}, ${this.vars.get_each_context}, ${get_key});`}
for (let #i = 0; #i < ${data_length}; #i += 1) {
let child_ctx = ${this.vars.get_each_context}(#ctx, ${
this.vars.each_block_value
}, #i);
let child_ctx = ${this.vars.get_each_context}(#ctx, ${this.vars.each_block_value}, #i);
let key = ${get_key}(child_ctx);
${lookup}.set(key, ${iterations}[#i] = ${create_each_block}(key, child_ctx));
}

@ -55,11 +55,7 @@ function create_each_block(ctx) {
insert_dev(target, t1, anchor);
},
p: function update(ctx, dirty) {
if (
dirty & /*things*/ 1 &&
t0_value !== (t0_value = /*thing*/ ctx[4].name + "")
)
set_data_dev(t0, t0_value);
if (dirty & /*things*/ 1 && t0_value !== (t0_value = /*thing*/ ctx[4].name + "")) set_data_dev(t0, t0_value);
if (dirty & /*foo, bar, baz, things*/ 15) {
const foo = /*foo*/ ctx[1];
@ -113,9 +109,7 @@ function create_fragment(ctx) {
add_location(p, file, 12, 0, 182);
},
l: function claim(nodes) {
throw new Error(
"options.hydrate only works if the component was compiled with the `hydratable: true` option"
);
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
},
m: function mount(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
@ -181,15 +175,14 @@ function instance($$self, $$props, $$invalidate) {
const writable_props = ["things", "foo", "bar", "baz"];
Object.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$")
console.warn(`<Component> was created with unknown prop '${key}'`);
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
});
$$self.$set = $$props => {
if ("things" in $$props) $$invalidate(0, (things = $$props.things));
if ("foo" in $$props) $$invalidate(1, (foo = $$props.foo));
if ("bar" in $$props) $$invalidate(2, (bar = $$props.bar));
if ("baz" in $$props) $$invalidate(3, (baz = $$props.baz));
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
if ("bar" in $$props) $$invalidate(2, bar = $$props.bar);
if ("baz" in $$props) $$invalidate(3, baz = $$props.baz);
};
$$self.$capture_state = () => {
@ -197,10 +190,10 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$inject_state = $$props => {
if ("things" in $$props) $$invalidate(0, (things = $$props.things));
if ("foo" in $$props) $$invalidate(1, (foo = $$props.foo));
if ("bar" in $$props) $$invalidate(2, (bar = $$props.bar));
if ("baz" in $$props) $$invalidate(3, (baz = $$props.baz));
if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
if ("bar" in $$props) $$invalidate(2, bar = $$props.bar);
if ("baz" in $$props) $$invalidate(3, baz = $$props.baz);
};
return [things, foo, bar, baz];
@ -209,12 +202,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance, create_fragment, safe_not_equal, {
things: 0,
foo: 1,
bar: 2,
baz: 3
});
init(this, options, instance, create_fragment, safe_not_equal, { things: 0, foo: 1, bar: 2, baz: 3 });
dispatch_dev("SvelteRegisterComponent", {
component: this,
@ -244,51 +232,35 @@ class Component extends SvelteComponentDev {
}
get things() {
throw new Error(
"<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set things(value) {
throw new Error(
"<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
get foo() {
throw new Error(
"<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set foo(value) {
throw new Error(
"<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
get bar() {
throw new Error(
"<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set bar(value) {
throw new Error(
"<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
get baz() {
throw new Error(
"<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set baz(value) {
throw new Error(
"<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"
);
throw new Error("<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
}

@ -81,9 +81,7 @@ function create_fragment(ctx) {
each_1_anchor = empty();
},
l: function claim(nodes) {
throw new Error(
"options.hydrate only works if the component was compiled with the `hydratable: true` option"
);
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
},
m: function mount(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {

Loading…
Cancel
Save