@raydiant/playlist-window-manager 0.27.1 → 0.27.2

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.
@@ -56,6 +56,8 @@ function createEmbeddedApp(presentation, applicationVersion, metadata) {
56
56
  value = presentation.applicationVariables[queryParamName];
57
57
  if (value === undefined)
58
58
  value = '';
59
+ if (value === null)
60
+ value = '';
59
61
  if (Array.isArray(value)) {
60
62
  value = JSON.stringify(value);
61
63
  }
@@ -149,3 +149,11 @@ test('Replaces $deviceId with empty string when in the query string and metadata
149
149
  });
150
150
  expect((0, embeddedApps_1.default)(presentation, applicationVersion, createMetadata())).toBe("https://example.com/content?device=");
151
151
  });
152
+ test('Replaces null with empty string', function () {
153
+ expect((0, embeddedApps_1.default)(createPresentation({
154
+ applicationVariables: { file: null },
155
+ }), createApplicationVersion({
156
+ embeddedUrlFormat: "https://example.come?image=:file",
157
+ presentationProperties: [{ type: 'file', name: 'file' }],
158
+ }), createMetadata())).toBe("https://example.come?image=");
159
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.27.1",
3
+ "version": "0.27.2",
4
4
  "description": "Window manager for playlist playback.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -277,3 +277,18 @@ test('Replaces $deviceId with empty string when in the query string and metadata
277
277
  createEmbeddedApp(presentation, applicationVersion, createMetadata())
278
278
  ).toBe(`https://example.com/content?device=`);
279
279
  });
280
+
281
+ test('Replaces null with empty string', () => {
282
+ expect(
283
+ createEmbeddedApp(
284
+ createPresentation({
285
+ applicationVariables: { file: null },
286
+ }),
287
+ createApplicationVersion({
288
+ embeddedUrlFormat: `https://example.come?image=:file`,
289
+ presentationProperties: [{ type: 'file', name: 'file' }],
290
+ }),
291
+ createMetadata()
292
+ )
293
+ ).toBe(`https://example.come?image=`);
294
+ });
@@ -66,6 +66,7 @@ export default function createEmbeddedApp(
66
66
 
67
67
  value = presentation.applicationVariables[queryParamName];
68
68
  if (value === undefined) value = '';
69
+ if (value === null) value = '';
69
70
  if (Array.isArray(value)) {
70
71
  value = JSON.stringify(value);
71
72
  }