Skip to content

Commit

Permalink
fix: playground
Browse files Browse the repository at this point in the history
  • Loading branch information
crashmax-dev committed Mar 13, 2024
1 parent 58f503c commit 2db62ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions apps/playground/src/pages/overlay/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ export const dudesSounds: SoundAsset[] = [
}
]

export const baseUrl = import.meta.env.DEV
? location.origin
: 'https://twirapp.github.com/dudes'
const productionUrl = 'https://twirapp.github.io/dudes'
export const baseUrl = import.meta.env.DEV ? location.origin : productionUrl

export const assetsLoaderOptions: AssetsLoaderOptions = {
basePath: baseUrl + '/sprites/',
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/src/pages/overlay/overlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ onMounted(async () => {
})
async function onMessage(event: MessageEvent<string>) {
if (!dudesRef.value || !dudesRef.value.dudes) return
if (!dudesRef.value || !dudesRef.value.dudes || event.source === window) return
const { type, data } = JSON.parse(event.data) as OverlayMessageEvent
Expand Down

0 comments on commit 2db62ab

Please sign in to comment.