Skip to content

Commit

Permalink
CLIP-46 #time 2h 40m Fixed Safari browser issues @resolve
Browse files Browse the repository at this point in the history
closed #57
  • Loading branch information
sthawali committed Sep 15, 2015
1 parent 5a703f0 commit aec6786
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 123 deletions.
15 changes: 9 additions & 6 deletions src/actions/ClipActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import Dispatcher from '../core/Dispatcher';
import apiUtils from '../utils/apiUtils';

const log = debug('clipboard:clipaction');
const isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;

export default {
getClips(page) {
apiUtils.getClips(page)
.then((res) => {
log('Got clips in actions %o', res);
console.log('Got clips in actions %o', res);
Dispatcher.dispatch({
actionType: SET_CLIPS,
payload: {
Expand Down Expand Up @@ -94,7 +95,7 @@ export default {
Dispatcher.dispatch({
actionType: GOT_SUCCESS,
payload: {
success: 'Successfully title change'
success: 'Changed title successfully'
}
});
})
Expand Down Expand Up @@ -132,10 +133,12 @@ export default {
apiUtils
.tempClip(clip)
.then((res) => {
Dispatcher.dispatch({
actionType: UPLOADING_CLIP,
payload: res
});
if(!isSafari) {
Dispatcher.dispatch({
actionType: UPLOADING_CLIP,
payload: res
});
}

apiUtils
.addClip(res.clip, data)
Expand Down
1 change: 0 additions & 1 deletion src/components/ClipApp/ClipApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class ClipApp extends React.Component {

render() {
log('Rendering clip view');

return (
<Container
onDragEnter={this.handleDragEnter.bind(this)}
Expand Down
1 change: 1 addition & 0 deletions src/components/Notify/Notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Notify extends React.Component {
}

addNotification() {
console.log(this.state.error);
this.notificationSystem.addNotification({
message: this.state.error ? this.state.error.message : this.state.success,
level: this.state.error ? 'error' : 'success',
Expand Down
Loading

0 comments on commit aec6786

Please sign in to comment.