Skip to content

Commit

Permalink
reverting a bunch of changes that actually were bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ceymard committed Feb 8, 2019
1 parent 8383852 commit c6bf8f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ export class Mixin<N extends Node = Node> {
(this.mounted as any) = true;
(this.node as any) = node;

this.observers.start()
this.inserted(node, parent)
this.observers.start()
}

/**
Expand All @@ -226,8 +226,8 @@ export class Mixin<N extends Node = Node> {
(this.mounted as any) = false;
(this.node as any) = null; // we force the node to null to help with garbage collection.

this.removed(node, parent, next, prev)
this.observers.stop()
this.removed(node, parent, next, prev)
}

/**
Expand Down
10 changes: 7 additions & 3 deletions src/verbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,13 @@ export class Repeater<T> extends Mixin<Comment> {
// the value of the list didn't change, so we need to insert the elements.
this.appendChildren(this.lst.length)
} else {
var parent = this.node.parentNode!
for (var p of this.positions)
mount(p, parent)
// We timeout this to prevent finishing mounting elements before having our own
// observable started, to avoid them registering BEFORE us
// setTimeout(() => {
// var parent = this.node.parentNode!
// for (var p of this.positions)
// mount(p, parent)
// })
}
}

Expand Down

0 comments on commit c6bf8f0

Please sign in to comment.