Check all asset types if type == null.
According to OpenFL's documentation, `type` is "The asset type to match, or null to match any type."
This commit is contained in:
@@ -336,6 +336,10 @@ class AssetLibrary
|
|||||||
|
|
||||||
return switch (cast(type, AssetType))
|
return switch (cast(type, AssetType))
|
||||||
{
|
{
|
||||||
|
case null:
|
||||||
|
cachedBytes.exists(id) || cachedText.exists(id) || cachedImages.exists(id)
|
||||||
|
|| cachedAudioBuffers.exists(id) || cachedFonts.exists(id);
|
||||||
|
|
||||||
case IMAGE:
|
case IMAGE:
|
||||||
cachedImages.exists(id);
|
cachedImages.exists(id);
|
||||||
|
|
||||||
@@ -345,7 +349,8 @@ class AssetLibrary
|
|||||||
case FONT:
|
case FONT:
|
||||||
cachedFonts.exists(id);
|
cachedFonts.exists(id);
|
||||||
|
|
||||||
default: cachedBytes.exists(id) || cachedText.exists(id);
|
default:
|
||||||
|
cachedBytes.exists(id) || cachedText.exists(id);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user