Skip to content

Commit

Permalink
Merge pull request #68 from wingy3181/master
Browse files Browse the repository at this point in the history
(fix) If directive is used twice with separate options, it will overr…
  • Loading branch information
mareczek committed Sep 17, 2015
2 parents 33a2c57 + 2531e39 commit 9b28589
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion releases/international-phone-number.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
return value.toString().replace(/[ ]/g, '').split(',');
}
};
options = ipnConfig;
options = angular.copy(ipnConfig);
angular.forEach(options, function(value, key) {
var option;
if (!(attrs.hasOwnProperty(key) && angular.isDefined(attrs[key]))) {
Expand Down
4 changes: 2 additions & 2 deletions releases/international-phone-number.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/international-phone-number.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ angular.module("internationalPhoneNumber", [])
else
value.toString().replace(/[ ]/g, '').split(',')

options = ipnConfig
options = angular.copy(ipnConfig)

angular.forEach options, (value, key) ->
return unless attrs.hasOwnProperty(key) and angular.isDefined(attrs[key])
Expand Down

0 comments on commit 9b28589

Please sign in to comment.