Skip to content

write-after-read-in-render and setSourceDestroying deprecations triggered using recognize-gesture modifier #136

@lupestro

Description

@lupestro

Using the {{recognize-gesture}} modifier, two deprecations are triggered.

The write-after-read-in-render occurs because the retrieve() method of the -gestures service is writing then reading an object that is managed using get and set, and the call to the service is occurring in the modifier constructor, which is called during a render.

The solution is to move the activity to the didInstall(), and put it and the subsequent activity in didInstall()behind aPromise.resolve().thenblock, asdidInstall()` is also called during render. (The non-modifier code already had a comparable deferral.)

The other deprecation occurs in ember-class-based-modifiers. The issue was fixed in ember-modifiers (the successor to ember-class-based-modifiers) in a recent release, so we just need to change the dependency.

I'll be issuing a PR shortly, but I wanted to make this easy to find.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions