Skip to content

Conversation

@sirugh
Copy link
Collaborator

@sirugh sirugh commented Jun 4, 2021

Description

Rather than try to gracefully merge an existing acdl (post-augment) with one loaded later, I simply check for an existing property and, if it exists, skip initialization entirely.

Related Issue

Closes #126

Motivation and Context

See #126

How Has This Been Tested?

Using the sandbox from the issue, I proxied the unpkg import to a local built file that included the changes in this PR.

Doing so logged the warning and allowed the second event to be observed by the original listener without having to re-attach it.

See screenshot below.

Screenshots (if appropriate):

Image from Gyazo

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: sirugh <rugh@adobe.com>
@sirugh
Copy link
Collaborator Author

sirugh commented Jun 4, 2021

I did not update docs/tests as I'd like to get feedback first.

@sirugh
Copy link
Collaborator Author

sirugh commented Jun 10, 2021

@jckautzmann are you the maintainer for this? If not, who can I ping for a review/merge :)

@jckautzmann jckautzmann merged commit f419184 into adobe:master Jun 11, 2021
@jckautzmann
Copy link
Contributor

@sirugh Thx for your contribution!

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.

Loading ACDL multiple times deletes existing event listeners

2 participants