Is there a way to test if a bundle exists before trying to render it?
I want to do something like this:
@{
var bundleName = GetBundleName();
}
@if (Scripts.BundleExists(bundleName))
{
@Scripts.Render(bundleName)
}
Obviously, Scripts.BundleExists()
isn't real, but it there something build in that does this? Or do I have to implement this myself?