mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Move assertion call behind guard
This commit is contained in:
parent
aa096e2744
commit
48905aa98d
@ -158,7 +158,9 @@ export class AtlasSprite extends BaseSprite {
|
||||
const scale = parameters.desiredAtlasScale;
|
||||
const link = this.linksByResolution[scale];
|
||||
|
||||
assert(link, "Link not known: " + scale);
|
||||
if (!link) {
|
||||
assert(false, "Link not known: " + scale + " (having " + Object.keys(this.linksByResolution) + ")");
|
||||
}
|
||||
|
||||
const scaleW = w / link.w;
|
||||
const scaleH = h / link.h;
|
||||
|
Loading…
Reference in New Issue
Block a user