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 issue 47 #48

Merged
merged 2 commits into from
Oct 29, 2022
Merged

Fix issue 47 #48

merged 2 commits into from
Oct 29, 2022

Conversation

lukePeavey
Copy link
Owner

@lukePeavey lukePeavey commented Oct 29, 2022

Issue: calling the split method multiple times on an instance causes the html content to be replaced with "undefined" (see #47)

Fix, store the original html content of the target elements at the beginning of the split method, instead of in the constructor.

#closes #47

Issue: if you call `instance.split` multiple times, the html content of
the target element(s) is replaced with "undefined"

This was due to fact that all stored data associated with the elements
is removed in the `revert` method. So after reverting the elements, the
could not be split again (this bug was introduced in #41).

Fix: store the original html content of the elements at the beginning
of the split method instead of the constructor.
@lukePeavey lukePeavey merged commit f16e043 into master Oct 29, 2022
@lukePeavey lukePeavey deleted the fix/issue-47 branch October 29, 2022 00:42
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.

Calling split() more than once results in 'undefined' text
1 participant