-
Notifications
You must be signed in to change notification settings - Fork 217
Develop.try catch #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
samples/chat/js/messages.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это точно нужно оставлять?
js/qbUtils.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можешь пояснить эту строку? Можешь комментирий /** оставить, что ты тут делаешь?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var listenerCall = Array.prototype.shift.apply(arguments);
Тут вырезаем из псевдомассива arguments первый элемент и сразу присваиваем в listenerCall, нам нужна функция (arguments[0] - это будет та самая функция, которая пришла в аргументах. Если её передать последним элементом, то аналогом было бы var listenerCall = Array.prototype.pop.apply(arguments);). В arguments теперь останутся только аргументы (без функции)
|
Пришли к тому, что лучше скопировать args в массив и с ним работать, т.к agrs и параметры ссылаються на одну ячейку памяти и могут быть не явные проблемы. |
… now the cycle does array from arguments
js/qbUtils.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (var i = 0; i < arguments.length; i++) {
argumentsArr.push(arguments[i]);
}
listenerCall = argumentsArr.shift();
вынести это из try - нам нужно только call проверить, так?
Может вместо argumentsArr назвать argumentsCopy,логичней звучит)
js/qbUtils.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мы разве оставляем console?
У нас вроде QBLog есть или что то такое. Которое следит за параметром debug конфига и пишит.
|
|
No description provided.