fix dev warnings

pull/3539/head
Richard Harris 6 years ago
parent f721a7d325
commit 9d9245d096

@ -61,7 +61,7 @@ export default class Component {
component_options: ComponentOptions; component_options: ComponentOptions;
namespace: string; namespace: string;
tag: Identifier; tag: string;
accessors: boolean; accessors: boolean;
vars: Var[] = []; vars: Var[] = [];
@ -163,12 +163,9 @@ export default class Component {
message: `No custom element 'tag' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. <svelte:options tag="my-thing"/>. To hide this warning, use <svelte:options tag={null}/>`, message: `No custom element 'tag' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. <svelte:options tag="my-thing"/>. To hide this warning, use <svelte:options tag={null}/>`,
}); });
} }
this.tag = { this.tag = this.component_options.tag || compile_options.tag;
type: 'Identifier',
name: this.component_options.tag || compile_options.tag
};
} else { } else {
this.tag = this.name; this.tag = this.name.name;
} }
this.walk_module_js(); this.walk_module_js();

Loading…
Cancel
Save