Skip to content

Commit

Permalink
refactor: delete try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxudong committed Aug 7, 2024
1 parent ca20789 commit c317ccb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/loader/src/gltf/extensions/EXT_texture_webp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ class EXT_texture_webp extends GLTFExtensionParser {

constructor() {
super();
try {
this._supportWebP = document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") == 0;
} catch (e) {
this._supportWebP = false;
}
this._supportWebP = document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") == 0;
}

override async createAndParse(
Expand Down

0 comments on commit c317ccb

Please sign in to comment.