Fix ladders

- TDZ violation in remote ladders.
- Lack of `get` method in local ladders.
This commit is contained in:
Ivo Julca 2015-11-08 15:52:00 -05:00
parent 44adce3f78
commit a5f4c85d56
2 changed files with 6 additions and 1 deletions

View File

@ -9,12 +9,15 @@
'use strict';
let Ladders = Ladders.get = module.exports = getLadder;
let Ladders = module.exports = getLadder;
function getLadder(formatid) {
return new Ladder(formatid);
}
Ladders.get = Ladders;
Ladders.formatsListPrefix = '';
function Ladder(formatid) {
this.formatid = toId(formatid);
}

View File

@ -17,6 +17,8 @@ function getLadder(formatid) {
return new Ladder(formatid);
}
Ladders.get = Ladders;
// tells the client to ask the server for format information
Ladders.formatsListPrefix = '|,LL';