pebble / pebblejs

Program the Pebble with simply JavaScript
MIT License
455 stars 229 forks source link

Number conversion to string - Menus #159

Closed fletchto99 closed 8 years ago

fletchto99 commented 8 years ago

Hey,

The other week I was hosting hackathon and some users were trying to send numbers as the title of the menu. When they did this the sub-title no longer rendered. I've put together a minimal example to replicate this issue:

var UI = require('ui');

new UI.Menu({
    sections: [{
        items: [{
            title: 89,
            subtitle: 'hello world'
        }, {
            title: 92,
            subtitle: 'hellow world'
        }]
    }]
}).show();
screen shot 2016-04-14 at 6 55 56 pm

As you can see the title renders fine but the subtitle is not there as expected. The expected output would be:

screen shot 2016-04-14 at 6 57 27 pm
Meiguro commented 8 years ago

Thanks for catching this one! Let me know if the fix works for you.

fletchto99 commented 8 years ago

Looks good thanks @Meiguro