Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Exposed purge globally, linting (fixes #271) #272

Merged
merged 1 commit into from
Sep 4, 2023
Merged

Conversation

oliverfoster
Copy link
Member

fixes #271

Fix

  • Made purge globally accessible at window.mejs.purge
  • Performed linting corrections on mediaLibrariesOverrides.js

Testing

Original code breaks when navigating away from Presentation Components to the menu, on destruction of mediaView line 399

purge(this.$el[0]);

This is as the function purge lives in a different file:
const purge = function (d) {
let a = d.attributes;
if (a) {
for (let i = a.length - 1; i >= 0; i -= 1) {
const n = a[i].name;
if (typeof d[n] === 'function') {
d[n] = null;
}
}
}
a = d.childNodes;
if (a) {
for (let i = 0, count = a.length; i < count; i += 1) {
purge(d.childNodes[i]);
}
}
};

@oliverfoster oliverfoster self-assigned this Aug 30, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

👀

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

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

👍

@oliverfoster oliverfoster merged commit ba5db01 into master Sep 4, 2023
@oliverfoster oliverfoster deleted the issue/271 branch September 4, 2023 10:54
github-actions bot pushed a commit that referenced this pull request Sep 4, 2023
## [6.4.2](v6.4.1...v6.4.2) (2023-09-04)

### Fix

* Exposed purge globally, linting (fixes #271) (#272) ([ba5db01](ba5db01)), closes [#271](#271) [#272](#272)
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

🎉 This PR is included in version 6.4.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Bug with purge function in overrides
4 participants