Skip to content

Commit

Permalink
Merge pull request #6109 from mozilla/fix-newloader-debugLocalScene
Browse files Browse the repository at this point in the history
Fix debugLocalScene when using newLoader
  • Loading branch information
netpro2k committed Jun 1, 2023
2 parents 7f8176c + 6113e97 commit e09dc34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/load-media-on-paste-or-drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ async function onPaste(e: ClipboardEvent) {

let lastDebugScene: string;
function onDrop(e: DragEvent) {
e.preventDefault();

if (!(AFRAME as any).scenes[0].is("entered")) {
return;
}
Expand All @@ -111,12 +113,10 @@ function onDrop(e: DragEvent) {

const files = e.dataTransfer?.files;
if (files && files.length) {
e.preventDefault();
return spawnFromFileList(files);
}
const url = e.dataTransfer?.getData("url") || e.dataTransfer?.getData("text");
if (url) {
e.preventDefault();
return spawnFromUrl(url);
}
}
Expand Down

0 comments on commit e09dc34

Please sign in to comment.