mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 15:30:37 +05:30
Minor fixes
This commit is contained in:
parent
a7f52f2d40
commit
26caa13b5f
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
}());
|
||||
});
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user