Skip to content

Commit

Permalink
Interactive demo assets base path fix (#975)
Browse files Browse the repository at this point in the history
## Changes
* Make asset past constant with respect to root of PennyLane Website
* This fixes assets not loading for [interactive
demo](https://pennylane.ai/qml/demos/circuits_as_fourier_series/)


## Note 
- this might not work correctly with current QML preview, but will work
on react site.
- this will work with #967
  • Loading branch information
ashishks0522 authored Nov 2, 2023
1 parent 6719252 commit d57a60f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions _static/demos/circuits_as_fourier_series/sketch.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
var url_prefix = '../../_static/demos/circuits_as_fourier_series/src/';

fetch(url_prefix + 'fourier0-1.png', {method: 'HEAD'}).then(res => {
if (!res.ok) {
url_prefix = '../_static/demos/circuits_as_fourier_series/src/';
}
});

const url_prefix = '/_static/demos/circuits_as_fourier_series/src/';

///// Sketch 0

Expand Down

0 comments on commit d57a60f

Please sign in to comment.