diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 21:02:49 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 21:02:49 -0700 |
commit | ef96768ac8a4ef3af360e0d0ad32706e21eb4d11 (patch) | |
tree | 3d0725de4ddfd81d613b0be204f13047c70560a2 /src/library_browser.js | |
parent | 875f21cc7d636b35332f36b87e479c9848bdb4ca (diff) |
detect file suffixes of all lengths
Diffstat (limited to 'src/library_browser.js')
-rw-r--r-- | src/library_browser.js | 3 |
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"] = []; |