Skip to content

Commit

Permalink
re-squash the latest v2 with fixed local overlay display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
FentPams committed Jun 12, 2024
2 parents bf1c872 + 2b6a7d2 commit 4e6769d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/experimentation/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 4e6769d

Please sign in to comment.