Skip to content

Commit

Permalink
fix: pill css loading on localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
ramboz committed Jun 11, 2024
1 parent f905090 commit a41fafc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AemExperimentationBar extends HTMLElement {
// Create a shadow root
const shadow = this.attachShadow({ mode: 'open' });

const cssPath = new URL(new Error().stack.split('\n')[2].match(/[a-z]+:[^:]+/)[0]).pathname.replace('preview.js', 'preview.css');
const cssPath = new URL(new Error().stack.split('\n')[2].match(/[a-z]+?:\/\/.*?\/[^:]+/)[0]).pathname.replace('preview.js', 'preview.css');
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = cssPath;
Expand Down

0 comments on commit a41fafc

Please sign in to comment.