Skip to content

Commit

Permalink
fix: πŸ› fix version checking in random
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Reese committed Jun 3, 2021
1 parent e27712f commit cf80c75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/random/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ const plugin = {
// version check
let enabled = false;
if (plugin.settings.version) {
const [major, minor, patch] = plugin.settings.version.split('.');
const pv = plugin.settings.version.split('.');
const major = Number(pv[0]);
const minor = Number(pv[1]);
const patch = Number(pv[2]);
if (major > 1) enabled = true;
if (major === 1 && minor > 4) enabled = true;
if (major === 1 && minor === 4 && patch >= 13) enabled = true;
Expand Down

0 comments on commit cf80c75

Please sign in to comment.