From 3bb1be2c3674f3ded3670a40763478be2f8f5a62 Mon Sep 17 00:00:00 2001 From: Benjamin Eckel Date: Sat, 10 Sep 2022 10:35:35 -0500 Subject: [PATCH] Fixes compiler error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit INFO AS210: Expression is never 'null'. : 82 │ this.writeString(str!); │ ~~~ └─ in ~lib/assemblyscript-json/assembly/encoder.ts(82,24) --- assembly/encoder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assembly/encoder.ts b/assembly/encoder.ts index c1e5d67..ec64a92 100644 --- a/assembly/encoder.ts +++ b/assembly/encoder.ts @@ -79,7 +79,7 @@ export class JSONEncoder { this._isFirstKey[this._isFirstKey.length - 1] = 0; } if (str != null && (str).length > 0) { - this.writeString(str!); + this.writeString(str); this.write(":"); } }