am 034a1089
: am 4d3aa886
: am ec4194ef
: am 64b879ac
: docs: fix js error when there\'s no api level cookie saved.
Merge commit '034a10891facd6e334be71b515e1d65c281f4278' * commit '034a10891facd6e334be71b515e1d65c281f4278': docs: fix js error when there's no api level cookie saved.
This commit is contained in:
@@ -26,6 +26,7 @@ function buildApiLevelSelector() {
|
|||||||
var maxLevel = SINCE_DATA.length;
|
var maxLevel = SINCE_DATA.length;
|
||||||
var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
|
var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
|
||||||
var userApiLevel = readCookie(API_LEVEL_COOKIE);
|
var userApiLevel = readCookie(API_LEVEL_COOKIE);
|
||||||
|
userApiLevel = userApiLevel == 0 ? maxLevel : userApiLevel; // If there's no cookie (zero), use the max by default
|
||||||
|
|
||||||
if (userApiLevelEnabled == 0) {
|
if (userApiLevelEnabled == 0) {
|
||||||
$("#apiLevelSelector").attr("disabled","disabled");
|
$("#apiLevelSelector").attr("disabled","disabled");
|
||||||
|
Reference in New Issue
Block a user