* VRFS-3419 - check better for window opener
This commit is contained in:
parent
36b6699cde
commit
e782d5f9bb
|
|
@ -8,7 +8,11 @@ mixins = []
|
|||
# this check ensures we attempt to listen if this component is created in a popup
|
||||
reactContext = if window.opener? then window.opener else window
|
||||
# make sure this is actually us opening the window, not someone else (by checking for MixerStore)
|
||||
reactContext = window unless 'MixerStore' in reactContext
|
||||
if window.opener?
|
||||
try
|
||||
m = window.opener.MixerStore
|
||||
catch e
|
||||
reactContext = window
|
||||
|
||||
MixerStore = reactContext.MixerStore
|
||||
MixerActions = reactContext.MixerActions
|
||||
|
|
|
|||
|
|
@ -6,7 +6,15 @@ mixins = []
|
|||
|
||||
# make sure this is actually us opening the window, not someone else (by checking for MixerStore)
|
||||
|
||||
if window.opener? && ('MixerStore' in window.opener)
|
||||
accessOpener = false
|
||||
if window.opener?
|
||||
try
|
||||
m = window.opener.MixerStore
|
||||
accessOpener = true
|
||||
catch e
|
||||
|
||||
|
||||
if accessOpener
|
||||
SessionActions = window.opener.SessionActions
|
||||
MediaPlaybackStore = window.opener.MediaPlaybackStore
|
||||
MixerActions = window.opener.MixerActions
|
||||
|
|
|
|||
|
|
@ -3,7 +3,16 @@ context = window
|
|||
mixins = []
|
||||
|
||||
# make sure this is actually us opening the window, not someone else (by checking for MixerStore)
|
||||
if window.opener && ('MixerStore' in window.opener)
|
||||
|
||||
accessOpener = false
|
||||
if window.opener?
|
||||
try
|
||||
m = window.opener.MixerStore
|
||||
accessOpener = true
|
||||
catch e
|
||||
|
||||
|
||||
if accessOpener
|
||||
mixins.push(Reflux.listenTo(window.opener.RecordingStore,"onRecordingStateChanged"))
|
||||
|
||||
@PopupRecordingStartStop = React.createClass({
|
||||
|
|
|
|||
Loading…
Reference in New Issue