Reloading page when back button is used.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import events from './events.js';
|
||||
|
||||
export default function navigate(path, query, options = {}) {
|
||||
const curatedQuery = Object.fromEntries(Object.entries(query || {}).map(([key, value]) => (value === undefined ? null : [key, value])).filter(Boolean));
|
||||
|
||||
@@ -17,4 +19,6 @@ export default function navigate(path, query, options = {}) {
|
||||
} else {
|
||||
history.pushState({}, '', url); // eslint-disable-line no-restricted-globals
|
||||
}
|
||||
|
||||
events.emit('route', url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user