Skip to content

Commit 82b8948

Browse files
Merge pull request #315 from rdkcentral/dev
Bumped version to 4.8.3 and updated the change log
2 parents 3f46a19 + effbd98 commit 82b8948

File tree

7 files changed

+38
-18
lines changed

7 files changed

+38
-18
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+
## v4.8.3
4+
5+
*19 apr 2022*
6+
7+
- Fixed bug in Router, app not closing when router history unavailable
8+
- Fixed bug in Router, router data hooks not always being called
9+
310
## v4.8.2
411

512
*21 mar 2022*

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+
## v4.8.3
4+
5+
*19 apr 2022*
6+
7+
- Fixed bug in Router, app not closing when router history unavailable
8+
- Fixed bug in Router, router data hooks not always being called
9+
310
## v4.8.2
411

512
*21 mar 2022*

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "4.8.2",
3+
"version": "4.8.3",
44
"license": "Apache-2.0",
55
"scripts": {
66
"postinstall": "node ./scripts/postinstall.js",

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "4.8.2",
3+
"version": "4.8.3",
44
"license": "Apache-2.0",
55
"scripts": {
66
"postinstall": "node ./scripts/postinstall.js",

src/Router/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ const resolveHashChange = request => {
346346

347347
/**
348348
* Directional step in history
349-
* @param direction
349+
* @param level
350350
*/
351351
export const step = (level = 0) => {
352352
if (!level || isNaN(level)) {
@@ -362,7 +362,7 @@ export const step = (level = 0) => {
362362
if (isFunction(app._handleAppClose)) {
363363
return app._handleAppClose()
364364
}
365-
return false
365+
return app.application.closeApp()
366366
} else if (history.length) {
367367
// for now we only support history back
368368
const route = history.splice(history.length - level, level)[0]

src/Router/utils/provider.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,18 @@ const execProvider = (request, emitProvided) => {
4848
const provider = route.provider
4949
const expires = route.cache ? route.cache * 1000 : 0
5050
const params = addPersistData(request)
51-
return provider.request(request.page, { ...params }).then(() => {
52-
request.page[symbols.expires] = Date.now() + expires
53-
if (emitProvided) {
54-
emit(request.page, 'dataProvided')
55-
}
56-
})
51+
return provider
52+
.request(request.page, { ...params })
53+
.then(() => {
54+
request.page[symbols.expires] = Date.now() + expires
55+
if (emitProvided) {
56+
emit(request.page, 'dataProvided')
57+
}
58+
})
59+
.catch(e => {
60+
request.page[symbols.expires] = Date.now()
61+
throw e
62+
})
5763
}
5864

5965
export const addPersistData = ({ page, route, hash, register = new Map() }) => {

0 commit comments

Comments
 (0)