Merge pull request #1537 from player-03/isLocal
Check all asset types if `type == null`.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user