Skip to content

Commit

Permalink
fix loading script multiple times in dev env on Hot reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 24, 2024
1 parent 5e8e05d commit 72d0e6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/components/Interpreter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function Interpreter(): JSX.Element {

const prod = process.env.NODE_ENV === 'production';

useScripts(prod ? [] : [
useScripts((prod || globalThis.jQuery) ? [] : [
'https://cdn.jsdelivr.net/npm/jquery',
'https://cdn.jsdelivr.net/combine/npm/jquery.terminal/js/jquery.terminal.min.js,npm/js-polyfills/keyboard.js,npm/prismjs/prism.js,npm/jquery.terminal/js/prism.js,npm/prismjs/components/prism-scheme.min.js',
'https://cdn.jsdelivr.net/gh/jcubic/lips@devel/lib/js/terminal.js',
Expand Down

0 comments on commit 72d0e6b

Please sign in to comment.