Commit 39df4a7e authored by Nick Stenning's avatar Nick Stenning

Check options.app exists before checking what it contains

This is a minor tweak so that we don't try and use CoffeeScripts "x in
y" (which reduces to "y.indexOf(x) !== -1") when y is undefined).
parent b082181f
......@@ -6,10 +6,14 @@ Guest = require('./guest')
module.exports = class Host extends Guest
constructor: (element, options) ->
# Make a copy of all options except `options.app`, the app base URL.
appOpts = queryString.stringify(
Object.assign({}, options, {app: undefined})
)
options.app += (if '?' in options.app then '&' else '?') + appOpts
if options.app and '?' in options.app
options.app += '&' + appOpts
else
options.app += '?' + appOpts
# Create the iframe
app = $('<iframe></iframe>')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment