Merge pull request #1537 from player-03/isLocal

Check all asset types if `type == null`.
This commit is contained in:
player-03
2022-09-05 23:01:43 -04:00
committed by GitHub

View File

@@ -334,10 +334,12 @@ class AssetLibrary
return true;
}
var requestedType = type != null ? cast(type, AssetType) : null;
return switch (requestedType)
return switch (cast(type, AssetType))
{
case null:
cachedBytes.exists(id) || cachedText.exists(id) || cachedImages.exists(id)
|| cachedAudioBuffers.exists(id) || cachedFonts.exists(id);
case IMAGE:
cachedImages.exists(id);
@@ -347,7 +349,8 @@ class AssetLibrary
case FONT:
cachedFonts.exists(id);
default: cachedBytes.exists(id) || cachedText.exists(id);
default:
cachedBytes.exists(id) || cachedText.exists(id);
}
#end
}