genesy / karabiner-complex-rules-generator

Simple web app to help generate Karabiner Elements Complex Rules
GNU General Public License v3.0
515 stars 26 forks source link

Fix the assumption that modifiers is always an array. #46

Open anacierdem opened 1 year ago

anacierdem commented 1 year ago

Apparently, the modifiers does not have to be objects or arrays, but string is also accepted. This change fixes the assumption that having a truthy length implies the object is an array. When it is a string, this does not hold and breaks it.

You can reproduce the existing code failing with this configuration.