-
Notifications
You must be signed in to change notification settings - Fork 59
Квашнина Ульяна #50
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
base: master
Are you sure you want to change the base?
Квашнина Ульяна #50
Conversation
🍅 Пройдено тестов 8 из 9 |
🍅 Пройдено тестов 8 из 9 |
🍅 Пройдено тестов 8 из 9 |
🍅 Пройдено тестов 8 из 9 |
🍏 Пройдено тестов 9 из 9 |
console.info(event); | ||
var emitEvent = []; | ||
var splitEvent = event.split('.'); | ||
var flag = 1; |
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.
Непонятно из названия, для чего конкретно этот флаг.
*/ | ||
off: function (event, context) { | ||
console.info(event, context); | ||
if (typeof (event) === 'string' && typeof (context) === 'object') { |
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.
Почему ты делаешь проверку именно так?
Что будет, если context будет объектом, но не валидным?
console.info(event, context); | ||
if (typeof (event) === 'string' && typeof (context) === 'object') { | ||
students = students.filter(function (subscriber) { | ||
|
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 splitEvent = event.split('.'); | ||
var flag = 1; | ||
|
||
for (var i = 0; i < splitEvent.length; i++) { |
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.
Может, стоит попробовать переписать этот блок поаккуратнее? Я сходу не могу понять, что у тебя тут происходит
🍅 |
No description provided.