Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

incorrect removal of parentheses in (-(--t)) #1996

Open
Zaitsev opened this issue May 10, 2021 · 0 comments
Open

incorrect removal of parentheses in (-(--t)) #1996

Zaitsev opened this issue May 10, 2021 · 0 comments

Comments

@Zaitsev
Copy link
Contributor

Zaitsev commented May 10, 2021

"fuse-box": "4.0.1-next.4",

in https://github.com/d3/d3-ease/blob/1e6f392ea72af6485d810e2214508a2350c64a8b/src/elastic.js#L11 they use

  return a * tpmt(-(--t)) * Math.sin((s - t) / p);

which is compiled to

   return a * math_js_1.tpmt(---t) * Math.sin((s - t) / p);

that leads to exception Uncaught SyntaxError: Invalid left-hand side expression in prefix operation

image

@Zaitsev Zaitsev changed the title incorrect removal of parentless in (-(--t)) incorrect removal of parentheses in (-(--t)) May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants