Closed jamesfid closed 7 years ago
@jamesfid currently the id is used for lookups, but nothing beyond that. I think we'd be well-served using a UUID. I found a few snippets for generating them on stackoverflow (http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript), and am gonna try tossing that code into a mixin.
There's also a couple of npm modules that do it..but given the outside chance of a collision use-case currently, I think the Math.random()
approach should be sufficient.
The way that the system is generating the
id
of a new question could have an issue. It runs this function:Unlikely to happen, but this is possible:
@DylanBell Should we consider somethign like UUID or keeping track in the JSON of the last used or something?