Because of non-semver compatible version checking on line 466 of spell-check-handler.js, this module is unusable with Electron versions > 10.0.0.
When you call new SpellCheckHandler(), the call fails with the following error:
Uncaught TypeError: Error processing argument at index 2, conversion failure from
at WebFrame.e.startsWith.WebFrame.<computed> [as setSpellCheckProvider] (electron/js2c/renderer_init.js:87)
at SpellCheckHandler.setSpellCheckProvider (<my app>/node_modules/electron-spellchecker/src/spell-check-handler.js:471)
at new SpellCheckHandler (<my app>/node_modules/electron-spellchecker/src/spell-check-handler.js:144)
at create (<my app>/src/context-menu.js:88)
at createContextMenu (<my app>/src/context-menu.js:105)
at <my app>/src/preload.js:35
This is because this code in spell-check-handler.js:
compares 5.0.0 with 11.2.1 (in my case) and in string comparison terms, 5.0.0 is greater. The library should compare the versions using SemVer as intended.
Because of non-semver compatible version checking on line 466 of
spell-check-handler.js
, this module is unusable with Electron versions > 10.0.0.When you call
new SpellCheckHandler()
, the call fails with the following error:This is because this code in
spell-check-handler.js
:compares
5.0.0
with11.2.1
(in my case) and in string comparison terms,5.0.0
is greater. The library should compare the versions using SemVer as intended.