Neal/pebble-authenticator — pull request #3 by henriwatson (2014-03-23 17:45:51+00:00)
Title: prevents showConfiguration from hanging when no options have been set

When showConfiguration is called on a new install it hangs as the 'options' localStorage item has not been set.

[INFO ] configuration requested
[INFO ] JS: Authenticator: read options: null
[INFO ] JS: Authenticator: showing configuration
[INFO ] Error: Authenticator: TypeError: null is not an object (evaluating 'options['timezone']') at line 10 in pebble-js-app.js

This issue is fixed by introducing a check that prevents passing the non-existent settings to the web configuration view.

This patch can be tested by placing the following line inside the showConfiguration call.

window.localStorage.removeItem('options');