Skip to content

Commit

Permalink
Tarik's change on regExPattern check
Browse files Browse the repository at this point in the history
Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
  • Loading branch information
Imod7 and TarikGul committed Apr 4, 2024
1 parent 132d1b1 commit 2afcf60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/runtime/RuntimeMetadataController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class RuntimeMetadataController extends AbstractController<Runtim
);

const regExPattern = new RegExp('^[vV][0-9]+$');
if (regExPattern.test(metadataVersion) === false) {
if (!regExPattern.test(metadataVersion)) {
throw new Error(
`${metadataVersion} input is not of the expected 'vX' format, where 'X' represents the version number (examples: 'v14', 'v15').`,
);
Expand Down

0 comments on commit 2afcf60

Please sign in to comment.