Skip to content

Commit 5237fc0

Browse files
committed
Fix diff change emit
1 parent 2727a0d commit 5237fc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/ngx-diff2html/src/lib/ngx-diff2html.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export class NgxDiff2htmlComponent implements OnInit, OnChanges {
3131
//console.log(changes);
3232
if (this.propHasChanged(changes.left) || this.propHasChanged(changes.right)) {
3333
this.getDiff();
34-
this.diffChange.emit(this.diff);
3534
} else if (this.propHasChanged(changes.style) || this.propHasChanged(changes.format)) {
3635
this.refreshDiffHTML();
3736
}
@@ -44,6 +43,7 @@ export class NgxDiff2htmlComponent implements OnInit, OnChanges {
4443
getDiff() {
4544
this.diff = this.diffService.getDiff(this.left, this.right, this.filename);
4645
this.refreshDiffHTML();
46+
this.diffChange.emit(this.diff);
4747
}
4848

4949
refreshDiffHTML() {

0 commit comments

Comments
 (0)