Skip to content

Commit 6217ef9

Browse files
committed
Fixed error when remoteCommand pause is without msg
1 parent 920f759 commit 6217ef9

File tree

3 files changed

+7
-52
lines changed

3 files changed

+7
-52
lines changed

build/nodegame-window.js

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,23 +2968,6 @@
29682968

29692969
"use strict";
29702970

2971-
// var J = node.JSUS;
2972-
2973-
// function getElement(idOrObj, prefix) {
2974-
// var el;
2975-
// if ('string' === typeof idOrObj) {
2976-
// el = W.getElementById(idOrObj);
2977-
// }
2978-
// else if (J.isElement(idOrObj)) {
2979-
// el = idOrObj;
2980-
// }
2981-
// else {
2982-
// throw new TypeError(prefix + ': idOrObj must be string ' +
2983-
// ' or HTML Element.');
2984-
// }
2985-
// return el;
2986-
// }
2987-
29882971
var GameWindow = node.GameWindow;
29892972

29902973
/**
@@ -3009,37 +2992,6 @@
30092992
W.init(node.conf.window);
30102993
});
30112994

3012-
// node.on('HIDE', function(idOrObj) {
3013-
// var el;
3014-
// console.log('***GameWindow.on.HIDE is deprecated. Use ' +
3015-
// 'GameWindow.hide() instead.***');
3016-
// el = getElement(idOrObj, 'GameWindow.on.HIDE');
3017-
// if (el) el.style.display = 'none';
3018-
// });
3019-
//
3020-
// node.on('SHOW', function(idOrObj) {
3021-
// var el;
3022-
// console.log('***GameWindow.on.SHOW is deprecated. Use ' +
3023-
// 'GameWindow.show() instead.***');
3024-
// el = getElement(idOrObj, 'GameWindow.on.SHOW');
3025-
// if (el) el.style.display = '';
3026-
// });
3027-
//
3028-
// node.on('TOGGLE', function(idOrObj) {
3029-
// var el;
3030-
// console.log('***GameWindow.on.TOGGLE is deprecated. Use ' +
3031-
// 'GameWindow.toggle() instead.***');
3032-
// el = getElement(idOrObj, 'GameWindow.on.TOGGLE');
3033-
// if (el) {
3034-
// if (el.style.display === 'none') {
3035-
// el.style.display = '';
3036-
// }
3037-
// else {
3038-
// el.style.display = 'none';
3039-
// }
3040-
// }
3041-
// });
3042-
30432995
// Disable all the input forms found within a given id element.
30442996
node.on('INPUT_DISABLE', function(id) {
30452997
W.toggleInputs(id, true);
@@ -3179,7 +3131,9 @@
31793131
}
31803132

31813133
function event_PAUSED(text) {
3182-
text = text || W.waitScreen.defaultTexts.paused;
3134+
// Ignores non-string parameters.
3135+
text = 'string' === typeof text ?
3136+
text : W.waitScreen.defaultTexts.paused;
31833137
if (W.isScreenLocked()) {
31843138
W.waitScreen.beforePauseInnerHTML =
31853139
W.waitScreen.contentDiv.innerHTML;
@@ -4541,7 +4495,6 @@
45414495
};
45424496

45434497
GameWindow.prototype.setInnerHTML = function(search, replace, mod) {
4544-
// console.log('***deprecated: use W.html instead of W.setInnerHTML');
45454498
this.html(search, replace, mod);
45464499
};
45474500

build/nodegame-window.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/WaitScreen.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@
9696
}
9797

9898
function event_PAUSED(text) {
99-
text = text || W.waitScreen.defaultTexts.paused;
99+
// Ignores non-string parameters.
100+
text = 'string' === typeof text ?
101+
text : W.waitScreen.defaultTexts.paused;
100102
if (W.isScreenLocked()) {
101103
W.waitScreen.beforePauseInnerHTML =
102104
W.waitScreen.contentDiv.innerHTML;

0 commit comments

Comments
 (0)