From a150dbf3290f6eb71fca9dbc4224155725f87c81 Mon Sep 17 00:00:00 2001 From: Cameron Diver <cameron@resin.io> Date: Thu, 8 Mar 2018 15:32:00 +0000 Subject: [PATCH] Convert object to array when normalising legacy target apps Change-type: patch Connects-to: #567 Signed-off-by: Cameron Diver <cameron@resin.io> --- src/device-state.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/device-state.coffee b/src/device-state.coffee index 1b831d66..8c49ce98 100644 --- a/src/device-state.coffee +++ b/src/device-state.coffee @@ -153,8 +153,9 @@ module.exports = class DeviceState extends EventEmitter .then => console.log('Migrating legacy app volumes') @applications.getTargetApps() - .map (app) => - @applications.volumes.createFromLegacy(app.appId) + .then(_.keys) + .map (appId) => + @applications.volumes.createFromLegacy(appId) .then => @config.set({ legacyAppsPresent: 'false' })