From fbbe9e72e217fcd7eef631e262b6fedb4df2cf99 Mon Sep 17 00:00:00 2001 From: jongwoo Yoo Date: Sat, 18 Jul 2015 21:15:46 +0900 Subject: [PATCH 1/2] Update chipsController.js --- src/components/chips/js/chipsController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chips/js/chipsController.js b/src/components/chips/js/chipsController.js index f2747520c6..8e2a34f369 100644 --- a/src/components/chips/js/chipsController.js +++ b/src/components/chips/js/chipsController.js @@ -138,7 +138,7 @@ MdChipsCtrl.prototype.getPlaceholder = function() { // Allow `secondary-placeholder` to be blank. var useSecondary = (this.items.length && (this.secondaryPlaceholder == '' || this.secondaryPlaceholder)); - return useSecondary ? this.placeholder : this.secondaryPlaceholder; + return useSecondary ? this.secondaryPlaceholder : this.placeholder; }; /** From a5dba2a27e44ee04ad47f1cf0ef4a9e4212eef79 Mon Sep 17 00:00:00 2001 From: jongwoo Yoo Date: Mon, 20 Jul 2015 12:53:30 +0900 Subject: [PATCH 2/2] fix ng-model error when ng-model value is undefined --- src/components/chips/js/chipsController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chips/js/chipsController.js b/src/components/chips/js/chipsController.js index 8e2a34f369..8a2ad32cbe 100644 --- a/src/components/chips/js/chipsController.js +++ b/src/components/chips/js/chipsController.js @@ -136,7 +136,7 @@ MdChipsCtrl.prototype.chipKeydown = function (event) { */ MdChipsCtrl.prototype.getPlaceholder = function() { // Allow `secondary-placeholder` to be blank. - var useSecondary = (this.items.length && + var useSecondary = (this.items && this.items.length && (this.secondaryPlaceholder == '' || this.secondaryPlaceholder)); return useSecondary ? this.secondaryPlaceholder : this.placeholder; };