check for unknown props even if component doesn't have writable props

fixes #4323
pull/4454/head
pushkin 6 years ago committed by GitHub
parent b8bf3643d4
commit de49a996ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -379,7 +379,7 @@ export default function dom(
}); });
let unknown_props_check; let unknown_props_check;
if (component.compile_options.dev && !component.var_lookup.has('$$props') && writable_props.length) { if (component.compile_options.dev && !component.var_lookup.has('$$props')) {
unknown_props_check = b` unknown_props_check = b`
const writable_props = [${writable_props.map(prop => x`'${prop.export_name}'`)}]; const writable_props = [${writable_props.map(prop => x`'${prop.export_name}'`)}];
@_Object.keys($$props).forEach(key => { @_Object.keys($$props).forEach(key => {

Loading…
Cancel
Save