From 13a0354f66bfd9eb9e5b78f40812553a561253a0 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Fri, 26 Jun 2015 21:17:05 -0700 Subject: [PATCH] fix(alert): adjust check for close attribute - Adjust check due to change in Angular 1.4 where the presence of attribute gives key value of `undefined`, causing variable to contain incorrect truthiness Closes #3864 Closes #3890 Fixes #3848 --- src/alert/alert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alert/alert.js b/src/alert/alert.js index 3fa9633abf..b1fda4ec83 100644 --- a/src/alert/alert.js +++ b/src/alert/alert.js @@ -1,7 +1,7 @@ angular.module('ui.bootstrap.alert', []) .controller('AlertController', ['$scope', '$attrs', function ($scope, $attrs) { - $scope.closeable = 'close' in $attrs; + $scope.closeable = !!$attrs.close; this.close = $scope.close; }])