indent.js
indent.js copied to clipboard
Cannot read properties of undefined (reading 'Int16Array')
Hello, with
import { indent } from "indent.js";
html=indent.html(html)
I am getting
Uncaught TypeError: Cannot read properties of undefined (reading 'Int16Array')
at intArray (indent.js:677)
at indent (indent.js:474)
at Object.html (indent.js:451)
at App.svelte:62
Any idea?
I'm having the same issue. Did you find a workaround?
Ditto.
Note: This patch fixes the issue. Will prepare a PR based on it when I get a moment unless someone else beats me to it ;)
https://github.com/zebzhao/indent.js/compare/master...intergestalt:indent.js:master
Update: ended up using js-beautify (https://www.npmjs.com/package/js-beautify)
(Two of the unit tests are failing and you need Node < 12 to run them so it was going to take too long to contribute in a meaningful way.)