Skip to content

Commit dd2409b

Browse files
committed
fix: update command in addon generator
1 parent 473ea59 commit dd2409b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

generators/addon/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
const process = require('process');
12
const chalk = require('chalk');
3+
const semver = require('semver');
24
const Insight = require('insight');
35
const camelCase = require('lodash.camelcase');
46
const upperFirst = require('lodash.upperfirst');
@@ -34,7 +36,7 @@ class NgxAddonGenerator extends Generator {
3436
}
3537

3638
if (fromVersion) {
37-
if (fromVersion >= this.version) {
39+
if (semver.gte(fromVersion, this.version)) {
3840
this.log(chalk.green('\nNothing to update, it’s all good!\n'));
3941
// eslint-disable-next-line unicorn/no-process-exit
4042
process.exit(0);

0 commit comments

Comments
 (0)