mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 18:34:48 +02:00
fixing oops dialog text index lookups
This commit is contained in:
parent
26b6967ba6
commit
42579f3d16
1 changed files with 6 additions and 4 deletions
|
@ -18,8 +18,9 @@
|
|||
|
||||
function getOopsText() {
|
||||
error = Window.getLastDomainConnectionError();
|
||||
if (hardRefusalErrors.indexOf(error) >= 0) {
|
||||
return ERROR_MESSAGE_MAP[error];
|
||||
var errorMessageMapIndex = hardRefusalErrors.indexOf(error);
|
||||
if (errorMessageMapIndex >= 0) {
|
||||
return ERROR_MESSAGE_MAP[errorMessageMapIndex];
|
||||
} else {
|
||||
// some other text.
|
||||
return ERROR_MESSAGE_MAP[4];
|
||||
|
@ -84,12 +85,13 @@
|
|||
function toggleOverlays() {
|
||||
var overlaysVisible = false;
|
||||
error = Window.getLastDomainConnectionError();
|
||||
var errorMessageMapIndex = hardRefusalErrors.indexOf(error);
|
||||
var oopsText = "";
|
||||
if (error === -1) {
|
||||
overlaysVisible = false;
|
||||
} else if (hardRefusalErrors.indexOf(error) >= 0) {
|
||||
} else if (errorMessageMapIndex >= 0) {
|
||||
overlaysVisible = true;
|
||||
oopsText = ERROR_MESSAGE_MAP[error];
|
||||
oopsText = ERROR_MESSAGE_MAP[errorMessageMapIndex];
|
||||
} else {
|
||||
overlaysVisible = true;
|
||||
oopsText = ERROR_MESSAGE_MAP[4];
|
||||
|
|
Loading…
Reference in a new issue