Skip to content

Commit

Permalink
fix(virtual): fix undefined document
Browse files Browse the repository at this point in the history
fixes #6318
  • Loading branch information
nolimits4web committed Feb 2, 2023
1 parent 6cb79cf commit 9cee290
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/virtual/virtual.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getDocument } from 'ssr-window';
import { createElement, elementChildren, setCSSProperty } from '../../shared/utils.js';

export default function Virtual({ swiper, extendParams, on, emit }) {
Expand All @@ -15,6 +16,7 @@ export default function Virtual({ swiper, extendParams, on, emit }) {
});

let cssModeTimeout;
const document = getDocument();

swiper.virtual = {
cache: {},
Expand Down

0 comments on commit 9cee290

Please sign in to comment.