Commit a3a67209 authored by Phil Hughes's avatar Phil Hughes

Fixed issue with expand diff not initializing resolve buttons

parent 69c7fc5f
......@@ -59,14 +59,15 @@
if (data.html) {
_this.content = $(data.html);
_this.content.syntaxHighlight();
if (typeof DiffNotesApp !== 'undefined') {
DiffNotesApp.compileComponents();
}
} else {
_this.hasError = true;
_this.content = $(ERROR_HTML);
}
return _this.collapsedContent.after(_this.content);
_this.collapsedContent.after(_this.content);
if (typeof DiffNotesApp !== 'undefined') {
DiffNotesApp.compileComponents();
}
};
})(this));
};
......
......@@ -4,7 +4,7 @@
//= require diff_notes/stores/comments
(() => {
function createDiscussion(noteId = 1, resolved = true) {
CommentsStore.create('a', noteId, resolved, 'test');
CommentsStore.create('a', noteId, true, resolved, 'test');
};
beforeEach(() => {
......@@ -91,6 +91,7 @@
it('is unresolved with 2 notes', () => {
const discussion = CommentsStore.state['a'];
createDiscussion(2, false);
console.log(discussion.isResolved());
expect(discussion.isResolved()).toBe(false);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment