ui: Fix detection of narrow window.

Fixes #17280.
This commit is contained in:
Nishant Mittal 2021-02-13 00:11:15 +05:30 committed by Tim Abbott
parent 9698fec008
commit f659744720
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,7 @@ exports.is_narrow = function () {
// This basically returns true when we hide the right sidebar for
// the left_side_userlist skinny mode. It would be nice to have a less brittle
// test for this.
return window.innerWidth < media_breakpoints.xl_min;
return window.innerWidth < Number(media_breakpoints.xl_min.slice(0, -2));
};
exports.system_initiated_animate_scroll = function (scroll_amount) {