Skip to content

Commit

Permalink
PR comment tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Fili committed Mar 14, 2019
1 parent 64ebae7 commit a0bb926
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/readResources.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function readBufferView(gltf, bufferViewId) {
return source.slice(byteOffset, byteOffset + bufferView.byteLength);
}

async function readFile(object, uri, options) {
function readFile(object, uri, options) {
const resourceDirectory = options.resourceDirectory;
const hasResourceDirectory = defined(resourceDirectory);

Expand All @@ -128,7 +128,7 @@ async function readFile(object, uri, options) {
absoluteUrl = new URL(uri,
hasResourceDirectory ? pathToFileURL(resourceDirectory) : undefined);
} catch(error) {
throw new RuntimeError('glTF model references separate files but no resourceDirectory is supplied');
return Promise.reject(new RuntimeError('glTF model references separate files but no resourceDirectory is supplied'));
}

// Generate file paths for the resource
Expand Down

0 comments on commit a0bb926

Please sign in to comment.