updated: condition for warning about unknown prop

pull/6065/head^2
zerdox 6 years ago committed by GitHub
parent ce3a579125
commit c4993fa77f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -399,7 +399,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) !== '$$') @_console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`);
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') @_console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`);
});
`;
}

Loading…
Cancel
Save