Skip to content

Commit 345189d

Browse files
authored
Will make a new PR later
1 parent d47e298 commit 345189d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ const connectCallReceiver = (info, methods, destructionPromise) => {
329329
* for the child to respond before rejecting the connection promise.
330330
* @return {Child}
331331
*/
332-
Penpal.connectToChild = ({ url, id = null, appendTo, methods = {}, timeout }) => {
332+
Penpal.connectToChild = ({ url, id, appendTo, methods = {}, timeout }) => {
333333
let destroy;
334334
const connectionDestructionPromise = new DestructionPromise(
335335
resolveConnectionDestructionPromise => {
@@ -339,7 +339,7 @@ Penpal.connectToChild = ({ url, id = null, appendTo, methods = {}, timeout }) =>
339339

340340
const parent = window;
341341
const iframe = document.createElement('iframe');
342-
iframe.id = id;
342+
(id !== undefined ? iframe.id = id : null);
343343

344344
(appendTo || document.body).appendChild(iframe);
345345

0 commit comments

Comments
 (0)