mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 12:36:41 -05:00
TOTD: Fix keys[0] not being the nom
This commit is contained in:
parent
708d81efde
commit
7ea8cfa668
|
|
@ -97,9 +97,11 @@ class OtdHandler {
|
|||
const id = settings.id || toID(title).charAt(0) + 'ot' + timeLabel.charAt(0);
|
||||
const handler = new OtdHandler(id, room, settings);
|
||||
otds.set(id, handler);
|
||||
if (!handler.keys.includes('time')) {
|
||||
handler.keys.unshift('time');
|
||||
handler.keyLabels.unshift('Timestamp');
|
||||
if (handler.keys[0] === 'time') {
|
||||
handler.keys.shift();
|
||||
handler.keyLabels.shift();
|
||||
handler.keys.push('time');
|
||||
handler.keyLabels.push('Timestamp');
|
||||
handler.save();
|
||||
}
|
||||
return handler;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user