diff --git a/backend/app/assets/javascripts/spree/backend/components/admin_nav.js b/backend/app/assets/javascripts/spree/backend/components/admin_nav.js index 5ad9ebf14b2..3e70c1a1582 100644 --- a/backend/app/assets/javascripts/spree/backend/components/admin_nav.js +++ b/backend/app/assets/javascripts/spree/backend/components/admin_nav.js @@ -1,5 +1,5 @@ Spree.ready(function() { - if (window.screen.width <= 1024 && !document.cookie.includes("admin_nav_hidden")) { + if (window.width <= 1024 && !document.cookie.includes("admin_nav_hidden")) { // Set default nav to collapse on small screens - but don't override user preference document.body.classList.add("admin-nav-hidden"); document.cookie = "admin_nav_hidden=true; expires=Fri, 31 Dec 9999 23:59:59 GMT";