League-of-Foundry-Developers / fvtt-module-popout

FVTT Module PopOut!
Other
29 stars 24 forks source link

"Uncaught TypeError: Math.clamped is not a function" in console #129

Open richardgaywood opened 1 month ago

richardgaywood commented 1 month ago

One of my players has reported seeing this in their console during a game. I cannot repro the issue, but I can see Math.clamped in the code. Foundry v12 code claims it's been deprecated, although one wouldn't think that would result errors... in foundry-esm.js I can see:

  /**
   * @deprecated since v12
   * @ignore
   */
  function clamped(num, min, max) {
    const msg = "Math.clamped is deprecated in favor of Math.clamp.";
    foundry.utils.logCompatibilityWarning(msg, {since: 12, until: 14, once: true});
    return clamp(num, min, max);
  }

Full stack trace of the Popout! error my player saw:

Uncaught TypeError: Math.clamped is not a function
    at TooltipManager._setStyle (game:452:47)
    at TooltipManager._setAnchor (game:435:17)
    at TooltipManager.activate (game:215:10)
    at #onDeactivate (game:139:24)
exuvo commented 3 weeks ago

I see it in popped out encounter tracker on pathfinder 2e.