Skip to content

Commit

Permalink
Default to first available extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong committed Feb 21, 2018
1 parent f12f1fe commit 1a08472
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/webgl_loader_gltf_extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@
var child = extensionSelect.children[i];
child.disabled = sceneInfo.extensions.indexOf(child.value) === -1;
if (child.disabled && child.selected) {
extensionSelect.value = extension = 'glTF';
if (sceneInfo.extensions.length === 0) {
extensionSelect.value = extension = 'glTF';
} else {
extensionSelect.value = extension = sceneInfo.extensions[0];
}
}
}

Expand Down

0 comments on commit 1a08472

Please sign in to comment.