Skip to content

MSZContextWatcher adding observer without context in init #12

@ghost

Description

The observer is added without context, therefore notification fires more than once. In init, addObserver code should read:

center.addObserver(self, selector: #selector(MSZContextWatcher.contextUpdated(_:)), name: NSManagedObjectContextDidSaveNotification, object: context)

The last paramater object: is nil in the original code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions