Closed boyland closed 4 months ago
As you clearly see from [the documentation](
), bigint
primitives and BigInt
objects are unsupported. Using unsupported features of the language that result in an error is not a surprising outcome.
I'm unsure what you want me to do about it by submitting a bug report. I mean the documentation clearly says it's unsupported.
The are multiple factors at work here:
JSON
doesn't support it and SugarCube uses JSON
to serialize. Now, that's probably not a deal breaker. I could probably write code to work around that, but it would be ugly because it would mean transforming the bigint
into a string
and back.Good points. I'd missed the documentation (my bad). It doesn't mention BigInt anywhere, but it does omit them from the list of supported types.
Sorry, what I wanted was an error report that was more informative (I spent a while trying to avoid printing BigInt variables using <<=...>>
only to discover that it was the transition itself that was causing the problem, and then figuring out it was the history system. In retrospect, maybe I should have figured out it was the history mechanism, or better reviewed the "Supported Types" section to notice that BigInt wasn't mentioned.
So, I guess I don't need anything from you.
I'm not sure what I could do wrt. generating a better error. Any error would come from the serializer, which it's already doing, and the error itself is actually pretty good—it tells you what went wrong and why. I'm not sure I could meaningfully better that.
Describe the bug. If a passage sets a
$
variable to a BigInt value, then clicking on a passage link gets a (confusing to the user) error message and no transition happen.To Reproduce: Create an HTML file from
Bring up the page and click "Next".
The first time, an error dialog comes up saying: (This is from Safari, Firefox is similar)
The next time the link is clicked, nothing happens (no error message, but also no transition)
Expected behavior. We go to the "Done" passage.
Project details.
Desktop details.
Additional context. This is not hard to work around (don't have any BigInt variables), but it took me a while to figure out why my web page was erroring
I'm not actually using history or the sidebar -- I turn these off, but still get the error.