Skip to content

Commit 2aae19c

Browse files
committed
improve additionnal dependency check
1 parent 0b07153 commit 2aae19c

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

core/class/zwavejs.class.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -287,17 +287,11 @@ public static function postConfig_zwavejs_mode($_value) {
287287
}
288288

289289
public static function additionnalDependancyCheck() {
290-
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
291-
$return = array();
292-
$return['state'] = 'ok';
293-
return $return;
294-
}
295290
$return = array();
296-
$return['state'] = 'ok';
297-
if (config::byKey('lastDependancyInstallTime', __CLASS__) == '') {
298-
$return['state'] = 'nok';
299-
} else if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) {
300-
$return['state'] = 'nok';
291+
if (config::byKey('zwavejs::mode', __CLASS__) === 'local') {
292+
if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) {
293+
$return['state'] = 'nok';
294+
}
301295
}
302296
return $return;
303297
}

0 commit comments

Comments
 (0)