summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-02-28 12:09:24 +0100
committerTor Andersson <tor@ccxvii.net>2025-02-28 12:10:35 +0100
commitd745d77007170117f04bf70f3c5601fc9f55fc0c (patch)
tree67f77fa23749fe4eb1f3a63b9fdfe6227e68d08e /rules.js
parent6e6b862e520a59dd2ef6e7d48075f4281496147b (diff)
downloadland-and-freedom-d745d77007170117f04bf70f3c5601fc9f55fc0c.tar.gz
Don't clobber readonly "roles" array when using it as active player list.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index ced9de7..e068bbf 100644
--- a/rules.js
+++ b/rules.js
@@ -292,7 +292,7 @@ function get_next_active(p) {
return p.map((faction) => faction_player_map[faction]);
}
if (p === 'all') {
- return exports.roles;
+ return exports.roles.slice();
}
if (p === 'None') {
return 'None';