Skip to content

Commit

Permalink
update: getNextMap to work with v8 (#361)
Browse files Browse the repository at this point in the history
* update: getNextMap to work with v8

* update: Increase Version
  • Loading branch information
IgnisAlienus authored Jun 12, 2024
1 parent de8219d commit 78fed13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SquadJS",
"version": "4.0.1",
"version": "4.1.0",
"repository": "https://github.com/Team-Silver-Sphere/SquadJS.git",
"author": "Thomas Smyth <https://github.com/Thomas-Smyth>",
"license": "BSL-1.0",
Expand Down
4 changes: 2 additions & 2 deletions squad-server/rcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ export default class SquadRcon extends Rcon {
const response = await this.execute('ShowNextMap');
const match = response.match(/^Next level is (.*), layer is (.*)/);
return {
level: match[1] !== '' ? match[1] : null,
layer: match[2] !== 'To be voted' ? match[2] : null
level: match ? (match[1] !== '' ? match[1] : null) : null,
layer: match ? (match[2] !== 'To be voted' ? match[2] : null) : null
};
}

Expand Down

0 comments on commit 78fed13

Please sign in to comment.