We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c485afe commit 82c0385Copy full SHA for 82c0385
src/providers/utils/mimetype.ts
@@ -68,7 +68,13 @@ export class CoreMimetypeUtilsProvider {
68
}
69
70
// If the extension has parameters, remove them.
71
- const position = extension.indexOf('?');
+ let position = extension.indexOf('?');
72
+ if (position > -1) {
73
+ extension = extension.substr(0, position);
74
+ }
75
+
76
+ // If the extension has an anchor, remove it.
77
+ position = extension.indexOf('#');
78
if (position > -1) {
79
extension = extension.substr(0, position);
80
0 commit comments