mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +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
|
.pipe(gulpif(!argv.production, sourcemaps.write())) // writes .map file
|
||||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||||
.pipe(gulpif(argv.production, uglify({
|
.pipe(gulpif(argv.production, uglify({
|
||||||
mangle: true,
|
mangle: false
|
||||||
compress: {
|
|
||||||
sequences: true,
|
|
||||||
dead_code: true,
|
|
||||||
conditionals: true,
|
|
||||||
booleans: true,
|
|
||||||
unused: true,
|
|
||||||
if_return: true,
|
|
||||||
join_vars: true,
|
|
||||||
drop_console: true
|
|
||||||
}
|
|
||||||
})))
|
})))
|
||||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||||
.pipe(gulp.dest('./build/js'))
|
.pipe(gulp.dest('./build/js'))
|
||||||
|
@ -352,18 +352,13 @@ var ReactS3FineUploader = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onComplete(id, name, res, xhr) {
|
onComplete(id, name, res, xhr) {
|
||||||
console.log(xhr);
|
|
||||||
// there has been an issue with the server's connection
|
// there has been an issue with the server's connection
|
||||||
if((xhr && xhr.status === 0) || res.error) {
|
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, {
|
console.logGlobal(new Error(res.error || 'Complete was called but there wasn\t a success'), false, {
|
||||||
files: this.state.filesToUpload,
|
files: this.state.filesToUpload,
|
||||||
chunks: this.state.chunks
|
chunks: this.state.chunks
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let files = this.state.filesToUpload;
|
let files = this.state.filesToUpload;
|
||||||
|
|
||||||
// Set the state of the completed file to 'upload successful' in order to
|
// 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);
|
let notification = new GlobalNotificationModel(err.message, 'danger', 5000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onError(id, name, errorReason) {
|
onError(id, name, errorReason) {
|
||||||
|
Loading…
Reference in New Issue
Block a user