Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't select the right loader if the file has dots #12

Closed
iranreyes opened this issue Jun 22, 2017 · 1 comment
Closed

It doesn't select the right loader if the file has dots #12

iranreyes opened this issue Jun 22, 2017 · 1 comment

Comments

@iranreyes
Copy link
Member

If the asset to preload has the format [filename](.[A-Z]*)*.[extension] then the loader pick up the generic one.

After some debug I found that the get extension method needs some improvements:

module.exports = function getExtension (url) {
  var ext;

  if (isBase64(url)) {
    var mime = base64Mime(url);
    ext = (mime.split('/'))[1];
  } else {
    ext = url.split('.').pop();
  }

  return ext || null;
};
njam3 added a commit that referenced this issue Jun 22, 2017
Issue #12: Getting always the last part of filename after the period
@njam3
Copy link
Member

njam3 commented Jun 22, 2017

Fixed as of preloader@4.0.2

@njam3 njam3 closed this as completed Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants