added check to disable warning on unknown prop

pull/6876/head
Tom Shaw 5 years ago
parent 350545ee0b
commit b80fcd1eb6

@ -444,7 +444,7 @@ export default function dom(
unknown_props_check = b`
const writable_props = [${writable_props.map(prop => x`'${prop.export_name}'`)}];
@_Object.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') @_console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`);
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot' && key !== 'event:bindings') @_console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`);
});
`;
}

Loading…
Cancel
Save