Commit 04733133 authored by Sven Franck's avatar Sven Franck

fix no type in postMessage can pass renderjs

parent cf8b64e5
......@@ -54,6 +54,9 @@
// http://bit.ly/WH2TRI
// http://bit.ly/zm0Csi
// URI-templates:
// https://code.google.com/p/uri-templates/
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global window: true, $: true, undefined: true, console: true,
document: true, require: true*/
......@@ -517,8 +520,9 @@
// => manages all interactions (listens to incoming postMessages)
// need a switch, because only one "message" listener can be set
priv.serviceHandler = function (event) {
var route = event.data.type.split("/"),
trackingId;
var type = event.data.type, route, trackingId;
if (type) {
route = event.data.type.split("/");
// authenticate all message senders
// basic "authentication" is done through the switch, which requires
......@@ -552,6 +556,7 @@
priv.returnResult(event);
break;
}
}
};
// => return the result to the function call
......
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