alexei / sprintf.js

sprintf.js is a complete open source JavaScript sprintf implementation
BSD 3-Clause "New" or "Revised" License
2.11k stars 291 forks source link

vsprintf('%f', 0) --> Uncaught TypeError: [sprintf] expecting number but found undefined #163

Closed claydodo closed 5 years ago

claydodo commented 6 years ago

It seems that vsprintf does not handle number 0 correctly: vsprintf('%f', 0) would yield this error:

Uncaught TypeError: [sprintf] expecting number but found undefined

alexei commented 6 years ago

I'm sorry you are experiencing this issue. I just checked on my machine and it seems both sprintf('%f', 0) and vsprintf('%f', [0]) return the right result. Have you tried turning your computer off and on again?