Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Export svgInjector

dominik-zeglen0c8239549d91
diff --git a/saleor/static/dashboard/js/components/misc.js b/saleor/static/dashboard/js/components/misc.js
index 9626901ede..81da4da96e 100644
--- a/saleor/static/dashboard/js/components/misc.js
+++ b/saleor/static/dashboard/js/components/misc.js
@@ -8,10 +8,12 @@ const screenSizes = {
lg: 1200
};
+const svgInjector = new SVGInjector();
+
// -----
-// SVG Injector
-new SVGInjector().inject(document.querySelectorAll('svg[data-src]'));
+// Inject all SVGs
+svgInjector.inject(document.querySelectorAll('svg[data-src]'));
// Custom select inputs
initSelects();
@@ -51,5 +53,6 @@ $('#product-is-published').on('click', (e) => {
});
export {
- screenSizes
+ screenSizes,
+ svgInjector
};