@rpg-engine/long-bow 0.2.76 → 0.2.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.2.76",
3
+ "version": "0.2.78",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -33,7 +33,8 @@ export const SpriteFromAtlas: React.FC<IProps> = ({
33
33
  //! If an item is not showing, remember that you MUST run yarn atlas:copy everytime you add a new item to the atlas (it will sync our public folder atlas with src/atlas).
34
34
  //!Due to React's limitations, we cannot import it from the public folder directly!
35
35
 
36
- const spriteData = atlasJSON.frames[spriteKey];
36
+ const spriteData =
37
+ atlasJSON.frames[spriteKey] || atlasJSON.frames['others/no-image.png'];
37
38
 
38
39
  if (!spriteData) throw new Error(`Sprite ${spriteKey} not found in atlas!`);
39
40