aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-04 21:02:49 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-04 21:02:49 -0700
commitef96768ac8a4ef3af360e0d0ad32706e21eb4d11 (patch)
tree3d0725de4ddfd81d613b0be204f13047c70560a2 /src/library_browser.js
parent875f21cc7d636b35332f36b87e479c9848bdb4ca (diff)
detect file suffixes of all lengths
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index b1e4190b..099516a8 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -75,8 +75,7 @@ mergeInto(LibraryManager.library, {
'ogg': 'audio/ogg',
'wav': 'audio/wav',
'mp3': 'audio/mpeg'
- }[name.substr(-3)];
- return ret;
+ }[name.substr(name.lastIndexOf('.')+1)];
}
if (!Module["preloadPlugins"]) Module["preloadPlugins"] = [];