exifreader 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exifreader",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "Library that parses Exif metadata in images.",
5
5
  "author": "Mattias Wallander <mattias@wallander.eu>",
6
6
  "repository": {
@@ -47,14 +47,12 @@ function isFilePathOrURL(data) {
47
47
  }
48
48
 
49
49
  function loadFile(filename) {
50
- if (typeof window !== 'undefined') {
50
+ if (typeof fetch !== 'undefined') {
51
51
  return browserFetchRemoteFile(filename);
52
52
  }
53
53
 
54
54
  if (/^https?:\/\//.test(filename)) {
55
- return nodeFetchRemoteFile(filename).then((buffer) => {
56
- return buffer;
57
- });
55
+ return nodeFetchRemoteFile(filename);
58
56
  }
59
57
 
60
58
  return loadLocalFile(filename);