From fc4b08502660123391234ddeab23f31b22f24ea2 Mon Sep 17 00:00:00 2001 From: darentuzi Date: Wed, 15 Jul 2015 14:44:41 +0300 Subject: [PATCH] Ternary operator syntax fix let to const and syntax update --- src/core/serializedtypes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/serializedtypes.js b/src/core/serializedtypes.js index 43edbdc7..dd6f3f4e 100644 --- a/src/core/serializedtypes.js +++ b/src/core/serializedtypes.js @@ -257,9 +257,9 @@ function parse(so) { } const field_bits = tag_byte & 0x0f; - let field_name = (field_bits === 0) - ? field_name = binformat.fields[type_bits][so.read(1)[0]] - : field_name = binformat.fields[type_bits][field_bits]; + const field_name = (field_bits === 0) + ? binformat.fields[type_bits][so.read(1)[0]] + : binformat.fields[type_bits][field_bits]; assert(field_name, 'Unknown field - header byte is 0x' + tag_byte.toString(16));