js : fix test and example

This commit is contained in:
Georgi Gerganov
2022-05-02 19:39:59 +03:00
parent fb4f0b15d0
commit 81f7647c81
2 changed files with 3 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ factory().then(function(ggwave) {
// decode the audio waveform back to text
var res = ggwave.decode(instance, waveform);
if (res != payload) {
if (new TextDecoder("utf-8").decode(res) != payload) {
process.exit(1);
}
});