Skip to content

Commit 44460d7

Browse files
author
Alexandre Laurent
committed
Prevent the popover options to be overwritten (fix #3173)
1 parent 3adb7fc commit 44460d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: js/angular/service/popover.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function($ionicModal, $ionicPosition, $document, $window) {
204204
* controller (ionicPopover is built on top of $ionicPopover).
205205
*/
206206
fromTemplate: function(templateString, options) {
207-
return $ionicModal.fromTemplate(templateString, ionic.Utils.extend(POPOVER_OPTIONS, options || {}));
207+
return $ionicModal.fromTemplate(templateString, ionic.Utils.extend({}, POPOVER_OPTIONS, options));
208208
},
209209
/**
210210
* @ngdoc method
@@ -215,7 +215,7 @@ function($ionicModal, $ionicPosition, $document, $window) {
215215
* an {@link ionic.controller:ionicPopover} controller (ionicPopover is built on top of $ionicPopover).
216216
*/
217217
fromTemplateUrl: function(url, options) {
218-
return $ionicModal.fromTemplateUrl(url, ionic.Utils.extend(POPOVER_OPTIONS, options || {}));
218+
return $ionicModal.fromTemplateUrl(url, ionic.Utils.extend({}, POPOVER_OPTIONS, options));
219219
}
220220
};
221221

0 commit comments

Comments
 (0)