@raydiant/playlist-window-manager 0.14.22 → 0.14.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,10 @@
1
- Usage:
1
+ ## Deployment
2
+
3
+ ```
4
+ yarn deploy
5
+ ```
6
+
7
+ ## Usage
2
8
 
3
9
  ```js
4
10
 
@@ -52,9 +52,14 @@ var IFrameRenderer = /** @class */ (function () {
52
52
  console.warn("Invalid message received from iframe '" + JSON.stringify(event.data) + "', ignoring message");
53
53
  return;
54
54
  }
55
+ if (!windowId) {
56
+ // ignore messages that don't have windowId
57
+ // such message are comming from 3rd party IFrames like google
58
+ return;
59
+ }
55
60
  var window = _this.getWindow(windowId);
56
61
  if (!window) {
57
- throw new Error("Failed add receive message callback to window, missing window id '" + windowId + "'");
62
+ throw new Error("Failed add receive message callback to window, window with window id: '" + windowId + "' was not found");
58
63
  }
59
64
  if (window.receiveMessageCallback) {
60
65
  window.receiveMessageCallback(type, payload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.14.22",
3
+ "version": "0.14.23",
4
4
  "description": "Window manager for playlist playback.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -202,10 +202,16 @@ export default class IFrameRenderer implements PresentationWindowRenderer {
202
202
  return;
203
203
  }
204
204
 
205
+ if (!windowId) {
206
+ // ignore messages that don't have windowId
207
+ // such message are comming from 3rd party IFrames like google
208
+ return;
209
+ }
210
+
205
211
  const window = this.getWindow(windowId);
206
212
  if (!window) {
207
213
  throw new Error(
208
- `Failed add receive message callback to window, missing window id '${windowId}'`
214
+ `Failed add receive message callback to window, window with window id: '${windowId}' was not found`
209
215
  );
210
216
  }
211
217