File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -299,12 +299,6 @@ function showVersionMismatchAndCli(message) {
299299 connectCli ( ) ;
300300}
301301
302- function checkApiVersionCompatibility ( ) {
303- const maxMajor = semver . major ( CONFIGURATOR . API_VERSION_MAX_SUPPORTED ) ;
304- const maxMinor = semver . minor ( CONFIGURATOR . API_VERSION_MAX_SUPPORTED ) ;
305- return semver . satisfies ( FC . CONFIG . apiVersion , `<=${ maxMajor } .${ maxMinor } ` ) ;
306- }
307-
308302/**
309303 * purpose of this is to bridge the old and new api
310304 * when serial events are handled.
@@ -349,7 +343,12 @@ function onOpen(openInfo) {
349343 }
350344
351345 // Check version compatibility first
352- if ( ! checkApiVersionCompatibility ( ) ) {
346+ if (
347+ ! semver . satisfies (
348+ FC . CONFIG . apiVersion ,
349+ `<=${ semver . major ( CONFIGURATOR . API_VERSION_MAX_SUPPORTED ) } .${ semver . minor ( CONFIGURATOR . API_VERSION_MAX_SUPPORTED ) } ` ,
350+ )
351+ ) {
353352 showVersionMismatchAndCli ( ) ;
354353 return ;
355354 }
You can’t perform that action at this time.
0 commit comments