diff --git a/src/device_manager/index.ts b/src/device_manager/index.ts index bc3b5c021..acb4036e1 100644 --- a/src/device_manager/index.ts +++ b/src/device_manager/index.ts @@ -145,7 +145,7 @@ export default class DeviceManager extends ItemManagerModule< * console.log(JSON.stringify(device)); * // {name: 'Tablet', width: '900px'} */ - get(id: string) { + get(id: string): Device | undefined { // Support old API const byName = this.getAll().filter(d => d.get('name') === id)[0]; return byName || this.devices.get(id) || null;