From 4f81e5b8c8e752255d60281dc921aab16ad15d53 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 29 Oct 2015 13:56:01 -0400 Subject: [PATCH] fix(popup): copied over the defaults so that the users opts will override them This way if we want to let the user pass an animation for an individual popup we can use that animation they pass over the default ones. Fixes #342 --- ionic/components/popup/popup.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ionic/components/popup/popup.ts b/ionic/components/popup/popup.ts index 79ebb47119..091a875fcb 100644 --- a/ionic/components/popup/popup.ts +++ b/ionic/components/popup/popup.ts @@ -82,7 +82,9 @@ export class Popup { opts.promiseResolve = resolve; opts.promiseReject = reject; - return this.ctrl.open(OVERLAY_TYPE, PopupCmp, util.extend(opts, this._defaults)); + let defaults = util.merge({}, this._defaults); + + return this.ctrl.open(OVERLAY_TYPE, PopupCmp, util.extend(defaults, opts)); }); }