Skip to content

Commit

Permalink
Merge pull request #4492 from jmbockhorst/iframe-testing
Browse files Browse the repository at this point in the history
Fix PersonaBar loading when within an iframe
  • Loading branch information
valadas authored Feb 12, 2021
2 parents a1ccb8c + e67b8a5 commit 52d947b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
define(['jquery'], function ($) {
return {
init: function () {
var inIframe = window !== window.top && typeof window.top.dnn !== "undefined";
var inIframe = window.parent && typeof window.parent.dnn !== "undefined";

var tabId = inIframe ? window.top.dnn.getVar('sf_tabId') : '';
var siteRoot = inIframe ? window.top.dnn.getVar('sf_siteRoot') : '';
var antiForgeryToken = inIframe ? window.top.document.getElementsByName('__RequestVerificationToken')[0].value : '';
var tabId = inIframe ? window.parent.dnn.getVar('sf_tabId') : '';
var siteRoot = inIframe ? window.parent.dnn.getVar('sf_siteRoot') : '';
var antiForgeryToken = inIframe ? window.parent.document.getElementsByName('__RequestVerificationToken')[0].value : '';

var config = $.extend({}, {
tabId: tabId,
Expand Down

0 comments on commit 52d947b

Please sign in to comment.