fix: correctly check for pushState function

fixes #523
This commit is contained in:
Baptiste Grob
2021-03-30 11:29:16 +02:00
parent fb7ca903df
commit 52f8acfb0e

View File

@@ -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