diff --git a/src/component/fiber.ts b/src/component/fiber.ts index 569721d3..c50407ad 100644 --- a/src/component/fiber.ts +++ b/src/component/fiber.ts @@ -227,7 +227,7 @@ export class Fiber { } // In self mode, we *know* we are to take possession of the target // Hence we manually create the corresponding VNode and copy the "key" in data - const selfVnodeData = fiber.vnode!.data ? {key: fiber.vnode!.data.key} : {}; + const selfVnodeData = fiber.vnode!.data ? { key: fiber.vnode!.data.key } : {}; const selfVnode = h(fiber.vnode!.sel, selfVnodeData); selfVnode.elm = target; target = selfVnode; diff --git a/src/qweb/qweb.ts b/src/qweb/qweb.ts index 662a841c..d3e8648d 100644 --- a/src/qweb/qweb.ts +++ b/src/qweb/qweb.ts @@ -133,7 +133,11 @@ const UTILS: Utils = { }, getScope(obj, property: string) { const obj0 = obj; - while (obj && !obj.hasOwnProperty(property) && !(obj.hasOwnProperty('__access_mode__') && obj.__access_mode__ === 'ro')) { + while ( + obj && + !obj.hasOwnProperty(property) && + !(obj.hasOwnProperty("__access_mode__") && obj.__access_mode__ === "ro") + ) { const newObj = obj.__proto__; if (!newObj || isComponent(newObj)) { return obj0; diff --git a/tests/component/un_mounting.test.ts b/tests/component/un_mounting.test.ts index 63f1e6bb..052c2a7c 100644 --- a/tests/component/un_mounting.test.ts +++ b/tests/component/un_mounting.test.ts @@ -29,25 +29,29 @@ describe("mount targets", () => { test("can attach a component to an existing node (if same tagname)", async () => { class App extends Component { static template = xml`
another tag
pre-existing
`; fixture.appendChild(div); const app = new App(); await app.mount(div, { position: "self" }); - expect(fixture.innerHTML).toBe(`pre-existing
appanother tag
pre-existing
appanother tag
pre-existing
appanother tag
pre-existing
appanother tag
a 2
b 3
c 4
d 5