mirror of
https://github.com/golang/go
synced 2024-11-11 19:31:37 -07:00
misc/wasm: update deprecated substr usage
String.prototype.substr is deprecated and usage is no longer recommended so using String.prototype.substring instead. Change-Id: I9eb49a8c065890df73301e3a04af59f550bc3ae1 Reviewed-on: https://go-review.googlesource.com/c/go/+/406094 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
6c3567873c
commit
ff34676cdd
@ -19,8 +19,8 @@
|
||||
outputBuf += decoder.decode(buf);
|
||||
const nl = outputBuf.lastIndexOf("\n");
|
||||
if (nl != -1) {
|
||||
console.log(outputBuf.substr(0, nl));
|
||||
outputBuf = outputBuf.substr(nl + 1);
|
||||
console.log(outputBuf.substring(0, nl));
|
||||
outputBuf = outputBuf.substring(nl + 1);
|
||||
}
|
||||
return buf.length;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user