From fc28dc4fc6552a57e12c99bed826629da1e9875f Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Sat, 1 Aug 2015 23:26:56 -0400 Subject: [PATCH 1/2] Failing test for double duplicate key push --- .../ember-htmlbars/tests/helpers/each_test.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/ember-htmlbars/tests/helpers/each_test.js b/packages/ember-htmlbars/tests/helpers/each_test.js index ecf8ab82531..b3e8577cf40 100644 --- a/packages/ember-htmlbars/tests/helpers/each_test.js +++ b/packages/ember-htmlbars/tests/helpers/each_test.js @@ -751,6 +751,29 @@ QUnit.test('pushing a new duplicate key will render properly with primitive item equal(view.$().text(), 'abca'); }); +QUnit.test('pushing primitive item twice will render properly', function() { + runDestroy(view); + view = EmberView.create({ + items: A(), + template: compile('{{#each view.items as |item|}}{{item}}{{/each}}') + }); + + runAppend(view); + + run(function() { + view.get('items').pushObject('a'); + }); + + equal(view.$().text(), 'a'); + + run(function() { + view.get('items').pushObject('a'); + }); + + equal(view.$().text(), 'aa'); +}); + + QUnit.test('duplicate keys work properly with objects', function() { runDestroy(view); let duplicateItem = { display: 'foo' }; From d8a2bb3c20fc1578cade0c5c196fcaaec4fe3151 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 2 Aug 2015 23:01:39 -0400 Subject: [PATCH 2/2] [BUGFIX beta] Update htmlbars to 0.14.2. Diff: https://github.com/tildeio/htmlbars/compare/v0.13.34...v0.14.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8dd5a57efe4..ac3ed8f75d8 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "finalhandler": "^0.4.0", "github": "^0.2.3", "glob": "~4.3.2", - "htmlbars": "0.13.34", + "htmlbars": "0.14.2", "qunit-extras": "^1.3.0", "qunitjs": "^1.16.0", "route-recognizer": "0.1.5",