Skip to content

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

2 participants