Skip to content

Commit

Permalink
Update device-detector.service.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pritamgb authored and AhsanAyaz committed Dec 1, 2020
1 parent a4c79d0 commit 4fee06a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class DeviceDetectorService {
this.browser_version = res[1];
}
}
this.orientation = window.matchMedia('(orientation: landscape)').matches
this.orientation = typeof window !== 'undefined' && window.matchMedia('(orientation: landscape)').matches
? OrientationType.Landscape
: OrientationType.Portrait;
this.deviceType = this.isTablet()
Expand Down

0 comments on commit 4fee06a

Please sign in to comment.