Skip to content

Conversation

Uliana1997
Copy link

No description provided.

@honest-hrundel
Copy link

🍅 Пройдено тестов 8 из 9

@honest-hrundel
Copy link

🍅 Пройдено тестов 8 из 9

@honest-hrundel
Copy link

🍅 Пройдено тестов 8 из 9

@honest-hrundel
Copy link

🍅 Пройдено тестов 8 из 9

@honest-hrundel
Copy link

🍏 Пройдено тестов 9 из 9

console.info(event);
var emitEvent = [];
var splitEvent = event.split('.');
var flag = 1;

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') {

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) {

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++) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может, стоит попробовать переписать этот блок поаккуратнее? Я сходу не могу понять, что у тебя тут происходит

@onufrienko
Copy link

🍅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants