Minor fixes

This commit is contained in:
SleepWalker 2017-01-02 15:37:02 +02:00
parent a7f52f2d40
commit 26caa13b5f
5 changed files with 15 additions and 14 deletions

View File

@ -121,7 +121,9 @@ export default class Profile extends Component {
range.selectNodeContents(this.UUID);
selection.removeAllRanges();
selection.addRange(range);
} catch (err) {}
} catch (err) {
// the browser does not support an API
}
}
setUUID(el) {

View File

@ -33,11 +33,6 @@ export default function scrollTo(y, viewPort) {
const newScrollTop = y + delta;
viewPort.scrollTop = newScrollTop;
if (viewPort.scrollTop === 0) {
scrollWasTouched = true;
console.warn('The viewPort is not scrollable', viewPort);
}
}());
});

View File

@ -53,6 +53,7 @@ class ChangeUsernamePage extends Component {
sendData: () => accounts.changeUsername(form.serialize())
}).then(() => {
this.actualUsername = form.value('username');
this.context.goToProfile();
});
};
@ -64,7 +65,5 @@ import { updateUser } from 'components/user/actions';
export default connect((state) => ({
username: state.user.username
}), {
updateUsername: (username) => {
return updateUser({username});
}
updateUsername: (username) => updateUser({username})
})(ChangeUsernamePage);

View File

@ -21,9 +21,14 @@ const logger = {
}
}).install();
window.addEventListener('unhandledrejection',
(event) => Raven.captureException(event.reason)
);
window.addEventListener('unhandledrejection', (event) => {
const error = event.reason || {};
const message = error.message ? `: ${error.message}` : '';
logger.info(`Unhandled rejection${message}`, {
error
});
});
}
},
@ -50,7 +55,7 @@ const logger = {
return;
}
console[method](message, context);
console[method](message, context); // eslint-disable-line
Raven.captureException(message, {
level,

View File

@ -120,7 +120,7 @@ const webpackConfig = {
new HtmlWebpackPlugin({
template: 'src/index.ejs',
favicon: 'src/favicon.ico',
scripts: isProduction ? [] : ['dll/vendor.dll.js'],
scripts: isProduction ? [] : ['/dll/vendor.dll.js'],
hash: false, // webpack does this for all our assets automagically
filename: 'index.html',
inject: false,