@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.
package/build/embeddedApps.js
CHANGED
|
@@ -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
package/src/embeddedApps.test.ts
CHANGED
|
@@ -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
|
+
});
|
package/src/embeddedApps.ts
CHANGED