|
|
|
|
@ -34,22 +34,14 @@ export function hmr(source) {
|
|
|
|
|
// when the component is invalidated, replace it without transitions
|
|
|
|
|
if (ran) set_should_intro(false);
|
|
|
|
|
|
|
|
|
|
var descriptors = Object.getOwnPropertyDescriptors(
|
|
|
|
|
// @ts-expect-error
|
|
|
|
|
new.target ? new component(anchor, props) : component(anchor, props)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// preserve getters/setters
|
|
|
|
|
for (var desc in descriptors) {
|
|
|
|
|
debugger
|
|
|
|
|
if (descriptors[desc].enumerable) {
|
|
|
|
|
Object.defineProperty(
|
|
|
|
|
instance,
|
|
|
|
|
desc,
|
|
|
|
|
descriptors[desc]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperties(
|
|
|
|
|
instance,
|
|
|
|
|
Object.getOwnPropertyDescriptors(
|
|
|
|
|
// @ts-expect-error
|
|
|
|
|
new.target ? new component(anchor, props) : component(anchor, props)
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (ran) set_should_intro(true);
|
|
|
|
|
});
|
|
|
|
|
|