Skip to content

Commit

Permalink
fix(templating.js): reset caused duplicate template contents (FineUpl…
Browse files Browse the repository at this point in the history
  • Loading branch information
kaliatech committed Dec 21, 2017
1 parent 8d25ba3 commit 15effaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/js/templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ qq.Templating = function(spec) {
},

reset: function() {
container.innerHTML = "";
this.render();
},

Expand Down
5 changes: 5 additions & 0 deletions test/unit/templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ describe("templating.js", function() {
assert.ok(!$fixture.find(".qq-upload-pause-selector").hasClass(HIDE_CSS));
assert.ok(!$fixture.find(".qq-upload-spinner-selector").hasClass(HIDE_CSS));
});

it("reset clears contents before appending new render", function() {
templating.reset()
assert.equal($fixture.find(".qq-uploader").length, 1);
});
});

describe("permanently hidden files tests", function() {
Expand Down

0 comments on commit 15effaa

Please sign in to comment.