1
0
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:
Tim Daubenschütz 2015-09-04 17:31:58 +02:00
parent ec1def31fb
commit 3b61ac5c6a
2 changed files with 45 additions and 61 deletions

View File

@ -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'))

View File

@ -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) {