diff --git a/Foundation/CPBundle.j b/Foundation/CPBundle.j index 9544ec98c..817ba6717 100644 --- a/Foundation/CPBundle.j +++ b/Foundation/CPBundle.j @@ -56,9 +56,17 @@ var CPBundlesForURLStrings = { }; var bundle = CFBundle.bundleWithIdentifier(anIdentifier); if (bundle) - bundle = CPBundlesForURLStrings[bundle.bundleURL().absoluteString()] || nil; + { + var url = bundle.bundleURL(), + cpBundle = CPBundlesForURLStrings[url.absoluteString()]; - return bundle; + if (!cpBundle) + cpBundle = [self bundleWithURL:url]; + + return cpBundle; + } + + return nil; } + (CPBundle)bundleForClass:(Class)aClass