Skip to content

Syntax error #1

@sunchenguang

Description

@sunchenguang

in mgame/js/server.js makeEmitter 函数的off方法中,

 off: (event, fn) => events.splice(events.find(
      ev => event === ev.event && ev.fn === fn
    ) - 1, 1),

这里应该使用events.findIndex而不是events.find函数, 而且没有 -1 吧

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions