@uppy/provider-views
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -489,5 +489,15 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
} | ||
// Check if it's a string before doing the JSON.parse to maintain support | ||
// for older Companion versions that used object references | ||
var data = typeof e.data === 'string' ? JSON.parse(e.data) : e.data; | ||
if (!data.token) { | ||
_this5.plugin.uppy.log('did not receive token from auth window'); | ||
return; | ||
} | ||
authWindow.close(); | ||
window.removeEventListener('message', handleToken); | ||
_this5.provider.setAuthToken(e.data.token); | ||
_this5.provider.setAuthToken(data.token); | ||
_this5.preFirstRender(); | ||
@@ -494,0 +504,0 @@ }; |
{ | ||
"name": "@uppy/provider-views", | ||
"description": "View library for Uppy remote provider plugins.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
@@ -22,8 +22,8 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "0.30.5", | ||
"@uppy/utils": "0.30.6", | ||
"classnames": "^2.2.6", | ||
"preact": "^8.2.9" | ||
"preact": "8.2.9" | ||
}, | ||
"devDependencies": { | ||
"@uppy/core": "1.0.0" | ||
"@uppy/core": "1.0.1" | ||
}, | ||
@@ -33,3 +33,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "25d4b3678b9bebb2127798b9185a0b2083a9dac1" | ||
"gitHead": "1ad322497ff694f06f328c3cccbe5cf0922c5bed" | ||
} |
@@ -422,5 +422,15 @@ const { h, Component } = require('preact') | ||
} | ||
// Check if it's a string before doing the JSON.parse to maintain support | ||
// for older Companion versions that used object references | ||
const data = typeof e.data === 'string' ? JSON.parse(e.data) : e.data | ||
if (!data.token) { | ||
this.plugin.uppy.log('did not receive token from auth window') | ||
return | ||
} | ||
authWindow.close() | ||
window.removeEventListener('message', handleToken) | ||
this.provider.setAuthToken(e.data.token) | ||
this.provider.setAuthToken(data.token) | ||
this.preFirstRender() | ||
@@ -427,0 +437,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98836
2129
+ Added@uppy/utils@0.30.6(transitive)
- Removed@uppy/utils@0.30.5(transitive)
- Removedpreact@8.5.3(transitive)
Updated@uppy/utils@0.30.6
Updatedpreact@8.2.9