From dda5cc1e5cf0a5269b6d2e2c7c9a1a0121f8257c Mon Sep 17 00:00:00 2001 From: Jeff Christy Date: Sat, 18 Aug 2018 13:38:26 -0500 Subject: [PATCH] Prevent unhandled exception when packages is not iterable This happens consistently when installed on Windows 10 WSL with Ubuntu 18.04 from a clean install --- lib/install-panel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/install-panel.js b/lib/install-panel.js index aee566a7..88a9e3b3 100644 --- a/lib/install-panel.js +++ b/lib/install-panel.js @@ -250,6 +250,9 @@ export default class InstallPanel { } addPackageViews (container, packages) { + if (packages == null || typeof packages[Symbol.iterator] !== 'function') { + return + } for (const pack of packages) { this.addPackageCardView(container, this.getPackageCardView(pack)) }