Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Don't allow overriding display options in request
Browse files Browse the repository at this point in the history
  • Loading branch information
callahad committed Aug 18, 2014
1 parent e96b9d1 commit 42100e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions resources/static/include_js/_include.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,11 @@
if (options.siteName) warn("Please pass siteName to .watch() instead of .request()");
if (options.backgroundColor) warn("Please pass backgroundColor to .watch() instead of .request()");

// Allow request to override display opts passed to watch, for UI testing.
options.siteLogo = options.siteLogo || displayOpts.siteLogo;
options.siteName = options.siteName || displayOpts.siteName;
options.backgroundColor = options.backgroundColor || displayOpts.backgroundColor;
// Options passed to .watch() always win.
// Necessary for backwards compatibility between Goldilocks and Observer
options.siteLogo = displayOpts.siteLogo || options.siteLogo;
options.siteName = displayOpts.siteName || options.siteName;
options.backgroundColor = displayOpts.backgroundColor || options.backgroundColor;

options.rp_api = getRPAPI();
var couldDoRedirectIfNeeded = (!needsPopupFix || api_called === 'request' || api_called === 'auth');
Expand Down

0 comments on commit 42100e1

Please sign in to comment.