Skip to content

Commit 92d2d9a

Browse files
Merge pull request #387 from rdkcentral/release/5.3.2
Release - v5.3.2
2 parents 401a9c0 + bcc1ba4 commit 92d2d9a

File tree

7 files changed

+50
-17
lines changed

7 files changed

+50
-17
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v5.3.2
4+
5+
*28 apr 2023*
6+
7+
- Fixed issue where some stage options are not properly preserved during deep merge (i.e canvas and webgl context) ([#388](https://github.com/rdkcentral/Lightning-SDK/pull/388))
8+
- Fixed router backtrack issue ([#385](https://github.com/rdkcentral/Lightning-SDK/issues/385)
9+
310
## v5.3.1
411
*23 feb 2023*
512

docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v5.3.2
4+
5+
*28 apr 2023*
6+
7+
- Fixed issue where some stage options are not properly preserved during deep merge (i.e canvas and webgl context) ([#388](https://github.com/rdkcentral/Lightning-SDK/pull/388))
8+
- Fixed router backtrack issue ([#385](https://github.com/rdkcentral/Lightning-SDK/issues/385)
9+
310
## v5.3.1
411
*23 feb 2023*
512

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "5.3.1",
3+
"version": "5.3.2",
44
"license": "Apache-2.0",
55
"types": "index.d.ts",
66
"scripts": {
@@ -29,6 +29,7 @@
2929
"@metrological/sdk": "^1.0.0",
3030
"@michieljs/execute-as-promise": "^1.0.0",
3131
"deepmerge": "^4.2.2",
32+
"is-plain-object": "^5.0.0",
3233
"localcookies": "^2.0.0",
3334
"shelljs": "^0.8.5",
3435
"url-polyfill": "^1.1.10",

package-lock.json

Lines changed: 16 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "5.3.1",
3+
"version": "5.3.2",
44
"license": "Apache-2.0",
55
"types": "index.d.ts",
66
"scripts": {
@@ -29,6 +29,7 @@
2929
"@metrological/sdk": "^1.0.0",
3030
"@michieljs/execute-as-promise": "^1.0.0",
3131
"deepmerge": "^4.2.2",
32+
"is-plain-object": "^5.0.0",
3233
"localcookies": "^2.0.0",
3334
"shelljs": "^0.8.5",
3435
"url-polyfill": "^1.1.10",

src/Application/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import Accessibility from '../Accessibility'
2121
import Deepmerge from 'deepmerge'
22+
import { isPlainObject } from 'is-plain-object'
2223
import Lightning from '../Lightning'
2324
import Locale from '../Locale'
2425
import Metrics from '../Metrics'
@@ -99,11 +100,10 @@ export default function(App, appData, platformSettings) {
99100

100101
return class Application extends Lightning.Application {
101102
constructor(options) {
102-
const config = Deepmerge(defaultOptions, options)
103-
// Deepmerge breaks HTMLCanvasElement, so restore the passed in canvas.
104-
if (options.stage.canvas) {
105-
config.stage.canvas = options.stage.canvas
106-
}
103+
const config = Deepmerge(defaultOptions, options, {
104+
isMergeableObject: isPlainObject
105+
})
106+
107107
super(config)
108108
this.config = config
109109
}

src/Router/index.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -357,14 +357,8 @@ export const step = (level = 0) => {
357357
// for now we only support negative numbers
358358
level = Math.abs(level)
359359

360-
// we can't step back past the amount
361-
// of history entries
362-
if (level > history.length) {
363-
if (isFunction(app._handleAppClose)) {
364-
return app._handleAppClose()
365-
}
366-
return app.application.closeApp()
367-
} else if (history.length) {
360+
//Check whether we have any history avaialble or not
361+
if (history.length) {
368362
// for now we only support history back
369363
const route = history.splice(history.length - level, level)[0]
370364
// store changed history
@@ -395,6 +389,15 @@ export const step = (level = 0) => {
395389
}
396390
}
397391
}
392+
393+
// we can't step back past the amount
394+
// of history entries
395+
if (level > history.length) {
396+
if (isFunction(app._handleAppClose)) {
397+
return app._handleAppClose()
398+
}
399+
return app.application.closeApp()
400+
}
398401
return false
399402
}
400403

0 commit comments

Comments
 (0)