mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
This is an issue where in jQuery v3 the result of outerHeight on a node that doesn’t exist is now “undefined” rather than “null”, which means it will no longer cast to a Number but rather NaN. For this, we create the safeOuterHeight and safeOuterWidth functions to safely return a result (or 0). This is a better solution than manually going to each instance and ORing it with 0 for type safety. https://stackoverflow.com/questions/41454285/jquery-outerheight-returns- undefined-instead-of-null