evancohen/smart-mirror

plugin loader fails if the plugin name is misspelled by user wanting to turn off

sdetweil opened this issue · 0 comments

after the user adds a plugin, then can create a position entry by adding a tab and typing in the name
but if they don't match the name exactly as it was (easy to do), then the code ASSUMES the plugin needs to be loaded

Expected Behavior

if disabled, the plugin should not be laoded

Current Behavior

the plugin is loaded

Possible Solution

lowercase the plugin names in the hash to avaoid this problem

Steps to Reproduce (for bugs)

  1. install 0.27
  2. add sams background image plugin (git clone https://github.com/sdetweil/backgroundImage while in plugin folder)
  3. restart sm,
  4. open config, fill in info for plugin config
  5. expand plugin Config section, hit plus
  6. add plugin name (all lower case)
  7. uncheck the Active checkbox
  8. hit submit
  9. the background should be black, shows pictures (if u got the links right)