Skip to content

Commit e196661

Browse files
committed
A small correction to the change version route.
1 parent d047312 commit e196661

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/server/routes/change_hc_version.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ export default (app) =>
5151

5252
// Compare versions
5353
const newVersion = request.params.newVersion;
54+
5455
// Accept only version strings containing digits, letters, dots, hyphens
55-
if (
56-
newVersion &&
57-
/^[a-zA-Z0-9.\-]+$/.test(newVersion)
58-
) {
56+
if (newVersion && /^[a-zA-Z0-9.-]+$/.test(newVersion)) {
5957
try {
6058
// eslint-disable-next-line import/no-named-as-default-member
6159
await updateVersion(newVersion);

0 commit comments

Comments
 (0)