diff --git a/CHANGELOG.md b/CHANGELOG.md index e10fc6d..c743dae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [1.5.1] (2022-11-09) + +### Fixed +- Problem with iterating over undefined + ## [1.5.0] (2022-08-09) ### Changed @@ -91,6 +96,7 @@ Display a hover with following conversions of the pointed hexadecimal value: +[1.5.1]: https://github.com/mateuszchudyk/vscode-hexinspector/compare/v1.5.0...v1.5.1 [1.5.0]: https://github.com/mateuszchudyk/vscode-hexinspector/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/mateuszchudyk/vscode-hexinspector/compare/v1.3.0...v1.4.0 [1.3.0]: https://github.com/mateuszchudyk/vscode-hexinspector/compare/v1.2.0...v1.3.0 diff --git a/package.json b/package.json index 473bd45..10beae9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "hexinspector", "displayName": "HexInspector", "description": "Provides fast and easy way to peek other forms of a hexadecimal/decimal/binary value", - "version": "1.5.0", + "version": "1.5.1", "publisher": "mateuszchudyk", "license": "MIT", "repository": { diff --git a/src/extension.ts b/src/extension.ts index bb7f5bd..5e7a96b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -19,7 +19,7 @@ export function activate(context: vscode.ExtensionContext) { } let bytes: Uint8Array; - let formsMap : input_handlers.MapFormToFunction; + let formsMap: input_handlers.MapFormToFunction; for (let inputDataType of inputDataTypes) { let inputHandler = input_handlers.createInputHandler(inputDataType); @@ -34,13 +34,13 @@ export function activate(context: vscode.ExtensionContext) { formsMap = inputHandler.getFormsMap(); } - let formMaxLength = 0; - for (let form of forms) { - if (form in formsMap) - formMaxLength = Math.max(formMaxLength, form.length); - } - if (bytes) { + let formMaxLength = 0; + for (let form of forms) { + if (form in formsMap) + formMaxLength = Math.max(formMaxLength, form.length); + } + let length = bytes.length; let message = 'HexInspector: ' + word + ' (' + length + 'B)\n\n'; for (let form of forms) {