particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

bugfix/ch61378/flash-tinker-product-device #592

Closed busticated closed 4 years ago

busticated commented 4 years ago

Description

running the particle flash <my-device> tinker when <my-device> is in a product fails with: Failed to flash <device-name>: Cannot read property 'map' of undefined (ch)

How to Test

using a product device, run particle flash <my-device> tinker then repeat that command using a non-product device and verify that both devices are flashed appropriately

Completeness

busticated commented 4 years ago

Ouch, the conditions hurt my brain.

haha! yeah, same.

platform_id is always defined for any device so it should be preferred over product_id

ah, nice. that helps - i can drop the else in that case at least - thanks :pray::+1: