From 52f8acfb0e9992bb5ec311a074ddb2bf08d91e07 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Tue, 30 Mar 2021 11:29:16 +0200 Subject: [PATCH] fix: correctly check for pushState function fixes #523 --- app/assets/javascripts/routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/routes.ts b/app/assets/javascripts/routes.ts index 42d646e37..66880fab8 100644 --- a/app/assets/javascripts/routes.ts +++ b/app/assets/javascripts/routes.ts @@ -3,7 +3,7 @@ import { isDesktopApplication } from './utils'; /* @ngInject */ export function configRoutes($locationProvider: ng.ILocationProvider) { if (!isDesktopApplication()) { - if (window.history && window.history.pushState) { + if (typeof window?.history?.pushState === 'function') { $locationProvider.html5Mode({ enabled: true, requireBase: false