Skip to content

Commit

Permalink
Merge pull request #387 from rdkcentral/release/5.3.2
Browse files Browse the repository at this point in the history
Release - v5.3.2
  • Loading branch information
michielvandergeest authored Apr 28, 2023
2 parents 401a9c0 + bcc1ba4 commit 92d2d9a
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v5.3.2

*28 apr 2023*

- 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))
- Fixed router backtrack issue ([#385](https://github.com/rdkcentral/Lightning-SDK/issues/385)

## v5.3.1
*23 feb 2023*

Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v5.3.2

*28 apr 2023*

- 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))
- Fixed router backtrack issue ([#385](https://github.com/rdkcentral/Lightning-SDK/issues/385)

## v5.3.1
*23 feb 2023*

Expand Down
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightningjs/sdk",
"version": "5.3.1",
"version": "5.3.2",
"license": "Apache-2.0",
"types": "index.d.ts",
"scripts": {
Expand Down Expand Up @@ -29,6 +29,7 @@
"@metrological/sdk": "^1.0.0",
"@michieljs/execute-as-promise": "^1.0.0",
"deepmerge": "^4.2.2",
"is-plain-object": "^5.0.0",
"localcookies": "^2.0.0",
"shelljs": "^0.8.5",
"url-polyfill": "^1.1.10",
Expand Down
18 changes: 16 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightningjs/sdk",
"version": "5.3.1",
"version": "5.3.2",
"license": "Apache-2.0",
"types": "index.d.ts",
"scripts": {
Expand Down Expand Up @@ -29,6 +29,7 @@
"@metrological/sdk": "^1.0.0",
"@michieljs/execute-as-promise": "^1.0.0",
"deepmerge": "^4.2.2",
"is-plain-object": "^5.0.0",
"localcookies": "^2.0.0",
"shelljs": "^0.8.5",
"url-polyfill": "^1.1.10",
Expand Down
10 changes: 5 additions & 5 deletions src/Application/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import Accessibility from '../Accessibility'
import Deepmerge from 'deepmerge'
import { isPlainObject } from 'is-plain-object'
import Lightning from '../Lightning'
import Locale from '../Locale'
import Metrics from '../Metrics'
Expand Down Expand Up @@ -99,11 +100,10 @@ export default function(App, appData, platformSettings) {

return class Application extends Lightning.Application {
constructor(options) {
const config = Deepmerge(defaultOptions, options)
// Deepmerge breaks HTMLCanvasElement, so restore the passed in canvas.
if (options.stage.canvas) {
config.stage.canvas = options.stage.canvas
}
const config = Deepmerge(defaultOptions, options, {
isMergeableObject: isPlainObject
})

super(config)
this.config = config
}
Expand Down
19 changes: 11 additions & 8 deletions src/Router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,8 @@ export const step = (level = 0) => {
// for now we only support negative numbers
level = Math.abs(level)

// we can't step back past the amount
// of history entries
if (level > history.length) {
if (isFunction(app._handleAppClose)) {
return app._handleAppClose()
}
return app.application.closeApp()
} else if (history.length) {
//Check whether we have any history avaialble or not
if (history.length) {
// for now we only support history back
const route = history.splice(history.length - level, level)[0]
// store changed history
Expand Down Expand Up @@ -395,6 +389,15 @@ export const step = (level = 0) => {
}
}
}

// we can't step back past the amount
// of history entries
if (level > history.length) {
if (isFunction(app._handleAppClose)) {
return app._handleAppClose()
}
return app.application.closeApp()
}
return false
}

Expand Down

0 comments on commit 92d2d9a

Please sign in to comment.