mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
remove mangle and fix bug in react-fineuploader
This commit is contained in:
parent
ec1def31fb
commit
3b61ac5c6a
12
gulpfile.js
12
gulpfile.js
@ -189,17 +189,7 @@ function bundle(watch) {
|
||||
.pipe(gulpif(!argv.production, sourcemaps.write())) // writes .map file
|
||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||
.pipe(gulpif(argv.production, uglify({
|
||||
mangle: true,
|
||||
compress: {
|
||||
sequences: true,
|
||||
dead_code: true,
|
||||
conditionals: true,
|
||||
booleans: true,
|
||||
unused: true,
|
||||
if_return: true,
|
||||
join_vars: true,
|
||||
drop_console: true
|
||||
}
|
||||
mangle: false
|
||||
})))
|
||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||
.pipe(gulp.dest('./build/js'))
|
||||
|
@ -352,18 +352,13 @@ var ReactS3FineUploader = React.createClass({
|
||||
},
|
||||
|
||||
onComplete(id, name, res, xhr) {
|
||||
console.log(xhr);
|
||||
// there has been an issue with the server's connection
|
||||
if((xhr && xhr.status === 0) || res.error) {
|
||||
console.log('asdasdas');
|
||||
console.logGlobal(new Error(res.error || 'Complete was called but there wasn\t a success'), false, {
|
||||
files: this.state.filesToUpload,
|
||||
chunks: this.state.chunks
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
let files = this.state.filesToUpload;
|
||||
|
||||
// Set the state of the completed file to 'upload successful' in order to
|
||||
@ -410,8 +405,7 @@ var ReactS3FineUploader = React.createClass({
|
||||
let notification = new GlobalNotificationModel(err.message, 'danger', 5000);
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onError(id, name, errorReason) {
|
||||
|
Loading…
Reference in New Issue
Block a user