Skip to content

Commit

Permalink
Squashed 'plugins/experimentation/' changes from 33c3263..09f8a72
Browse files Browse the repository at this point in the history
09f8a72 fix: pill css loading on localhost

git-subtree-dir: plugins/experimentation
git-subtree-split: 09f8a72796f1ca9daeb91e68c62ef4952f5c4254
  • Loading branch information
Xinyi Feng committed Jun 11, 2024
1 parent 5b251ff commit 2b6a7d2
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 @@ -23,7 +23,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 2b6a7d2

Please sign in to comment.