pull/16748/head
Rich Harris 6 days ago
parent 48bace7439
commit 673e9151ca

@ -201,7 +201,6 @@ export class Payload {
); );
} }
this.global.subsume(other.global);
this.local = other.local; this.local = other.local;
this.#out = other.#out.map((item) => { this.#out = other.#out.map((item) => {
if (item instanceof Payload) { if (item instanceof Payload) {
@ -401,16 +400,6 @@ export class TreeState {
this.#head = new TreeHeadState(this.#uid); this.#head = new TreeHeadState(this.#uid);
this.#mode = mode; this.#mode = mode;
} }
/**
* @param {TreeState} other
*/
subsume(other) {
this.#css = other.#css;
this.#uid = other.#uid;
this.#head.subsume(other.#head);
this.#mode = other.#mode;
}
} }
export class TreeHeadState { export class TreeHeadState {

@ -179,10 +179,6 @@ test('subsume replaces tree content and state from other', () => {
assert.equal(a.type, 'body'); assert.equal(a.type, 'body');
assert.equal(a.local.select_value, 'B'); assert.equal(a.local.select_value, 'B');
assert.strictEqual(a.promises, b.promises); assert.strictEqual(a.promises, b.promises);
// global state transferred
assert.ok([...a.global.css][0]?.hash === 'h');
assert.equal(a.global.head.title.value, 'Title');
}); });
test('subsume refuses to switch modes', () => { test('subsume refuses to switch modes', () => {

Loading…
Cancel
Save