Index: ui/file_manager/file_manager/background/js/device_handler.js |
diff --git a/ui/file_manager/file_manager/background/js/device_handler.js b/ui/file_manager/file_manager/background/js/device_handler.js |
index bf79b40c4fb6918d3a92c5b10f0c1c496c7af246..ede54098f505c1ab065868d0e40aedc21991e81a 100644 |
--- a/ui/file_manager/file_manager/background/js/device_handler.js |
+++ b/ui/file_manager/file_manager/background/js/device_handler.js |
@@ -192,7 +192,7 @@ DeviceHandler.Notification.prototype.showOnce = function(devicePath) { |
/** |
* Shows the notificaiton without using AsyncQueue. |
- * @param {string} notificaitonId Notification ID. |
+ * @param {string} notificationId Notification ID. |
* @param {?string} message Message overriding the normal message. |
* @param {function()} callback Callback to be invoked when the notification is |
* created. |
@@ -302,14 +302,13 @@ DeviceHandler.prototype.onMountCompleted_ = function(event) { |
// If this is remounting, which happens when resuming ChromeOS, the device has |
// already inserted to the computer. So we suppress the notification. |
var volume = event.volumeMetadata; |
- if (!volume.deviceType || !event.shouldNotify) |
+ if (!volume.deviceType || !volume.devicePath || !event.shouldNotify) |
return; |
// If the current volume status is succeed and it should be handled in |
// Files.app, show the notification to navigate the volume. |
if (event.eventType === 'mount' && event.status === 'success') { |
- DeviceHandler.Notification.DEVICE_NAVIGATION.show( |
- event.volumeMetadata.devicePath); |
+ DeviceHandler.Notification.DEVICE_NAVIGATION.show(volume.devicePath); |
} else if (event.eventType === 'unmount') { |
DeviceHandler.Notification.DEVICE_NAVIGATION.hide(volume.devicePath); |
} |