mirror of
https://github.com/mozilla/send.git
synced 2026-02-05 18:35:00 -05:00
Fix #890 Fix delete by initializing the metrics on android; delete was trying to use metrics and causing an exception because it hadn't been initialized
This commit is contained in:
@@ -74,6 +74,7 @@ export default function(state, emitter) {
|
||||
});
|
||||
|
||||
emitter.on('delete', async ({ file, location }) => {
|
||||
console.log('ondelete');
|
||||
try {
|
||||
metrics.deletedUpload({
|
||||
size: file.size,
|
||||
@@ -86,6 +87,7 @@ export default function(state, emitter) {
|
||||
state.storage.remove(file.id);
|
||||
await file.del();
|
||||
} catch (e) {
|
||||
console.log(e.stack);
|
||||
state.raven.captureException(e);
|
||||
}
|
||||
render();
|
||||
|
||||
Reference in New Issue
Block a user