Skip to content

Commit

Permalink
update browser-sync-client ts version
Browse files Browse the repository at this point in the history
- switch to ts-loader over deprecated `awesome-typescript-loader`
- update invalid window.reload implementations
  • Loading branch information
lachieh committed Feb 24, 2022
1 parent daa8cd0 commit e909447
Show file tree
Hide file tree
Showing 5 changed files with 6,018 additions and 418 deletions.
4 changes: 3 additions & 1 deletion packages/browser-sync-client/lib/browser.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function setScroll(pos) {
* Hard reload
*/
export function reloadBrowser() {
getWindow().location.reload(true);
getWindow().location.reload();
}

/**
Expand All @@ -151,6 +151,8 @@ export function forEach(coll, fn) {
* @returns {boolean}
*/
export function isOldIe() {
// @ts-ignore - Only IE < 11 has .attachEvent property
// https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa703974(v=vs.85)
return typeof getWindow().attachEvent !== "undefined";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export function preBrowserReload() {
export function browserReloadEffect(xs: Observable<any>, inputs: Inputs) {
return xs.pipe(
withLatestFrom(inputs.window$),
tap(([, window]) => window.location.reload(true))
tap(([, window]) => window.location.reload())
);
}

0 comments on commit e909447

Please sign in to comment.