| Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
|
| index 8f53f3ae4adb1669bb2565447044f923bb8ca6af..79c6098ad465a667674c1ff917d3029fc22e1146 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
|
| @@ -401,11 +401,12 @@ WebInspector.DeviceModeToolbar.prototype = {
|
| */
|
| _deviceListChanged: function()
|
| {
|
| - if (!this._model.device())
|
| + var device = this._model.device();
|
| + if (!device)
|
| return;
|
|
|
| var devices = this._allDevices();
|
| - if (devices.indexOf(this._model.device()) === -1) {
|
| + if (devices.indexOf(device) === -1) {
|
| if (devices.length)
|
| this._emulateDevice(devices[0]);
|
| else
|
|
|