Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## Unreleased

- Use `globalThis` polyfill to get global object, as using `eval` was failing with strict CSP policies

## 0.1.11 - July 9th 2017

- On nodejs, decode strings using UTF-8 instead of ASCII. Ideally we'd do this in the browser (UTF-16 currently) as well but that is a bit more work.
- On nodejs, decode strings using UTF-8 instead of ASCII. Ideally we'd do this in the browser (UTF-16 currently) as well but that is a bit more work.

## 0.1.10 - July 9th 2017

Expand Down
2 changes: 1 addition & 1 deletion browser-global.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
var api = require('./index');
var global = (1,eval)('this');
var global = require('globalthis/polyfill')();
global.ExifParser = api;
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
var Parser = require('./lib/parser');

function getGlobal() {
return (1,eval)('this');
}
var getGlobal = require('globalthis/polyfill');

module.exports = {
create: function(buffer, global) {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"devDependencies": {
"browserify": "^7.0.0",
"uglify-js": "^2.4.15"
},
"dependencies": {
"globalthis": "^1.0.0"
}
}