# Breaking Mobile view check after Discourse update to 2.5.0.beta7

**URL:** https://meta.discourse.org/t/breaking-mobile-view-check-after-discourse-update-to-2-5-0-beta7/155816
**Category:** Support
**Created:** [24 juni 2020 om 14:22 UTC](https://meta.discourse.org/t/breaking-mobile-view-check-after-discourse-update-to-2-5-0-beta7/155816 "2020-06-24T14:22:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Suvankar\_Satpati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/suvankar_satpati/32/171825_2.png) [@Suvankar\_Satpati](https://meta.discourse.org/u/Suvankar_Satpati)
#### Post date: [24 juni 2020 om 14:22 UTC](https://meta.discourse.org/t/breaking-mobile-view-check-after-discourse-update-to-2-5-0-beta7/155816/1 "2020-06-24T14:22:25Z")

</div>

Discourse.Mobile was working fine previously but Breaking after Discourse update to 2.5.0.beta7

Error message i am seeing in the console:  
`TypeError: can't access property "mobileView", Discourse.Mobile is undefined`

I need to have a conditional statement based on whether its mobile view or desk top view from ‘common’ section.

> if(Discourse.Mobile.mobileView){  
> do something  
> }  
> This was working earlier but now broken.

How can I check whether its mobile view loaded?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [25 juni 2020 om 06:42 UTC](https://meta.discourse.org/t/breaking-mobile-view-check-after-discourse-update-to-2-5-0-beta7/155816/2 "2020-06-25T06:42:05Z")

</div>

Try [safe mode](https://meta.discourse.org/t/53504?silent=true), this is likely a third party theme component or plugin you have installed.

> [@Using Safe Mode to troubleshoot issues with themes and plugins](https://meta.discourse.org/t/how-to-use-discourse-safe-mode/53504):
>
> bookmark This guide explains how to use Discourse’s [Safe Mode](https://meta.discourse.org/t/53504?silent=true) to troubleshoot issues with themes and plugins. person_raising_hand Required user level: All users Discourse offers a “JavaScript [Safe Mode](https://meta.discourse.org/t/53504?silent=true)” that allows any user to isolate the root cause of JavaScript issues caused by plugins, themes, or theme components. This feature is particularly useful for troubleshooting problems on your Discourse site. Accessing [Safe Mode](https://meta.discourse.org/t/53504?silent=true) To access [Safe Mode](https://meta.discourse.org/t/53504?silent=true), follow these steps: Open a new browse…
