Breaking Mobile view check after Discourse update to 2.5.0.beta7

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.

do something
This was working earlier but now broken.

How can I check whether its mobile view loaded?

Try safe mode, this is likely a third party theme component or plugin you have installed.