Commit 96912033 by Dányi Bence

webui: fix store navigation, when a file has no extension

parent a3011ce2
...@@ -484,7 +484,13 @@ $(function() { ...@@ -484,7 +484,13 @@ $(function() {
break; break;
} }
} }
var extension=d.NAME.match(/\.\w+$/)[0].substr(1); var extension;
try {
extension=d.NAME.match(/\.\w+$/)[0].substr(1);
}
catch (ex) {
extension='N/A';
}
viewData = { viewData = {
originalName: d.NAME, originalName: d.NAME,
originalSize: d.SIZE, originalSize: d.SIZE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment