Skip to content

Commit

Permalink
restartWebflow: Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiglesias93 committed Dec 16, 2021
1 parent d1c1b3b commit 0f5f6ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@finsweet/ts-utils",
"version": "0.27.4",
"version": "0.27.5",
"description": "Typescript utils for custom Webflow projects.",
"main": "index.ts",
"module": "index.ts",
Expand Down
12 changes: 2 additions & 10 deletions webflow/restartWebflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,10 @@ export const restartWebflow = async (modules?: WebflowModule[]): Promise<unknown
}

// Lightbox
if (modules?.includes('lightbox')) {
const lightbox = Webflow.require('lightbox');

lightbox?.ready();
}
if (modules?.includes('lightbox')) Webflow.require('lightbox')?.ready();

// Slider
if (modules?.includes('slider')) {
const slider = Webflow.require('slider');

slider?.redraw();
}
if (modules?.includes('slider')) Webflow.require('slider')?.redraw();

return new Promise((resolve) => Webflow.push(() => resolve(undefined)));
};

0 comments on commit 0f5f6ee

Please sign in to comment.