Skip to content

Commit a95a451

Browse files
Merge pull request #284 from rdkcentral/feature/router
Feature/router
2 parents c1122e3 + 8a99476 commit a95a451

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/Router/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,16 @@ const resume = () => {
419419
}
420420
}
421421

422+
/**
423+
* Force reload active hash
424+
*/
425+
const reload = () => {
426+
if (!isNavigating()) {
427+
const hash = getActiveHash()
428+
navigate(hash, { reload: true }, false)
429+
}
430+
}
431+
422432
/**
423433
* Query if the Router is still processing a Request
424434
* @returns {boolean}
@@ -527,6 +537,7 @@ export default {
527537
getHistoryState,
528538
replaceHistoryState,
529539
getQueryStringParams,
540+
reload,
530541
symbols,
531542
App: RoutedApp,
532543
// keep backwards compatible

src/Router/utils/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const incorrectParams = (cb, route) => {
113113

114114
export const getQueryStringParams = (hash = getActiveHash()) => {
115115
const resumeHash = getResumeHash()
116-
if (hash === '$' || resumeHash) {
116+
if ((hash === '$' || !hash) && resumeHash) {
117117
if (isString(resumeHash)) {
118118
hash = resumeHash
119119
}

0 commit comments

Comments
 (0)