diff --git a/build.js b/build.js index 1afe1ef..99c7b2a 100644 --- a/build.js +++ b/build.js @@ -4,7 +4,7 @@ import { sassPlugin } from 'esbuild-sass-plugin' import * as fs from 'fs' const serve = process.env.ESBUILD_SERVE === '1' -const baseurl = process.env.ESBUILD_BASEURL || '/' +const baseurl = process.env.ESBUILD_BASEURL || '' console.log(`Building with baseurl ${baseurl}`) diff --git a/src/modules/simulationRenderer/classes/SimulationRenderer.ts b/src/modules/simulationRenderer/classes/SimulationRenderer.ts index 5e039a5..0bf987e 100644 --- a/src/modules/simulationRenderer/classes/SimulationRenderer.ts +++ b/src/modules/simulationRenderer/classes/SimulationRenderer.ts @@ -81,7 +81,7 @@ export class SimulationRenderer { public updateWheelListener(ref: RefObject) { if (ref.current) { ref.current.addEventListener('wheel', (event) => { - if (!modalIsOpen() && location.pathname === process.env.BASEURL) { + if (!modalIsOpen() && location.pathname === `${process.env.BASEURL}/`) { event.preventDefault() handleScroll(event, this.camera)