Commit 9ac99707580c5b6cf17d38d6b59e041b22c20a99
1 parent
1f25453d
Exists in
fix_javascript
and in
1 other branch
Fixing manual's page extension format algorithm
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
theme.js
... | ... | @@ -148,9 +148,11 @@ $('#link-buscar').click(function(e) { |
148 | 148 | /* Splits a file name from its extension. Example: example.pdf becomes example - PDF */ |
149 | 149 | function split_file_extension(element) { |
150 | 150 | var tokens = element.innerHTML.split('.'); |
151 | - var fileName = tokens[0]; | |
152 | - var fileExtension = tokens[1].toUpperCase(); | |
153 | - element.innerHTML = fileName + " - " + fileExtension; | |
151 | + if(tokens.length == 2) { | |
152 | + var fileName = tokens[0]; | |
153 | + var fileExtension = tokens[1].toUpperCase(); | |
154 | + element.innerHTML = fileName + " - " + fileExtension; | |
155 | + } | |
154 | 156 | } |
155 | 157 | |
156 | 158 | $(document).ready(function(){ | ... | ... |