feat: simpler TypeError; use proxy default err
This commit is contained in:
parent
75f914606f
commit
07bb2d850a
2 changed files with 2 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "web-component-base",
|
||||
"version": "2.0.0-beta.10",
|
||||
"version": "2.0.0-beta.11",
|
||||
"description": "A zero-dependency, ~600 Bytes (minified & gzipped), JS base class for creating reactive custom elements easily",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
|
|
|
@ -134,9 +134,7 @@ export class WebComponent extends HTMLElement {
|
|||
effectsMap[prop] = [];
|
||||
}
|
||||
effectsMap[prop].push(value.callback);
|
||||
} else if (typeof oldValue !== typeof value) {
|
||||
const err = new TypeError(`[${meta.constructor.name}.props.${prop}] ${typeof value} is not assignable to ${typeof oldValue}`)
|
||||
console.error(err);
|
||||
} else if (typeMap[prop] !== typeof value) {
|
||||
return false;
|
||||
} else if (oldValue !== value) {
|
||||
obj[prop] = value;
|
||||
|
|
Loading…
Reference in a new issue