Node.js bug ? function’s return value change when stored as variable

Your function decodeWebStream mutates the input variable d. This probably combined with an error elsewhere in your code double-encoding your data is probably leading to the second call of decodeWebStream giving you the correct value (but not first or third).

Leave a Comment