Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Fix: When destroying a component with an not initialized swiper.#341

Merged
surmon-china merged 1 commit intosurmon-china:swiper5from
HappyGray24:hotfix/destroying-not-initialized-swiper
Mar 12, 2020
Merged

Fix: When destroying a component with an not initialized swiper.#341
surmon-china merged 1 commit intosurmon-china:swiper5from
HappyGray24:hotfix/destroying-not-initialized-swiper

Conversation

@HappyGray24
Copy link
Copy Markdown

When you destroy a component, where swiper not initialized (swiper.initialized === undefined || swiper.initialized === false), then an error occurs: "Failed to execute 'remove' on 'DOMTokenList'."

Fix the code on the per-line 115 file ~/src/ssr.js on:

if (swiper) {
  if (swiper.destroy && swiper.initialized === true) {
    swiper.destroy();
  }
  delete vnode.context[instanceName]
}

that not to destroy the not yet initialized swiper../

#340

@hoektoe
Copy link
Copy Markdown

hoektoe commented Jul 31, 2018

Is the maintainer gone , haven't seen any progress on this repo

DarkRiDDeR added a commit to DarkRiDDeR/vue-swiper-ave2 that referenced this pull request Apr 30, 2019
@qntndev
Copy link
Copy Markdown

qntndev commented Feb 13, 2020

@surmon-china Please merge 🙏

@surmon-china surmon-china changed the base branch from master to swiper5 March 12, 2020 18:22
@surmon-china
Copy link
Copy Markdown
Owner

Thanks!

@surmon-china surmon-china merged commit 0a06c84 into surmon-china:swiper5 Mar 12, 2020
@surmon-china
Copy link
Copy Markdown
Owner

The change will merge to v4.0.0

@surmon-china surmon-china mentioned this pull request Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants