Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
neki-dev committed Nov 3, 2023
1 parent 7c959e4 commit b9220cd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "phaser-react-ui",
"description": "React interface render for Phaser engine",
"version": "1.14.3",
"version": "1.14.4",
"keywords": [
"phaser",
"interface",
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/use-texture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export function useTexture(key: string) {
const texture = game.textures.get(key);
const image = texture.getSourceImage() as HTMLTextureElement;

return URL.createObjectURL(image.originBlob);
return image.originBlob
? URL.createObjectURL(image.originBlob)
: null;
}, [key]);
}

0 comments on commit b9220cd

Please sign in to comment.