Fix emitter leaks, style, tree swaps
This commit is contained in:
@@ -18,7 +18,14 @@ export class Edge implements Hashable {
|
||||
|
||||
public hash(): string {
|
||||
if (!this.cachedHash) {
|
||||
const previousHash = (this.source && this.source.sourceEdge) ? this.source.sourceEdge.hash() : ''
|
||||
let previousHash
|
||||
if (this.source && this.source.sourceEdge) {
|
||||
previousHash = this.source.sourceEdge.hash()
|
||||
} else {
|
||||
// Use the tree hash to distinguish between different trees
|
||||
previousHash = this.source && this.source.isTree ? (this.source as any).hash() : ''
|
||||
}
|
||||
|
||||
this.cachedHash = `H${sha1(previousHash + this.name)}`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user