RIAEvangelist / node-dominos-pizza-api

This is a node.js wrapper for the dominos pizza apis
MIT License
545 stars 132 forks source link

Address trim breaks if not all sections are present #14

Closed RIAEvangelist closed 9 years ago

RIAEvangelist commented 9 years ago

Should add some intelligence to handle if a partial address is passed or if address piece is missing

This worked before adding trim because the values would be set to undefined, but you can't call a function on undefined...

/home/bmiller/git/node-dominos-pizza-api/src/Address.js:24 this.City = splitAddress[1].trim(); ^ TypeError: Cannot read property 'trim' of undefined