Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8913] MobileWeb: Ti.App.Properties getters return null for falsey default values

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-18T10:48:00.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-10 MW
ComponentsMobileWeb
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2012-04-29T07:36:32.000+0000
Updated2017-03-21T18:56:40.000+0000

Description

There's a bug in Ti.App.Properties where falsey default values return null (if the property value is undefined. The problem is in the getProp() function where the correct line should be:
return value === void 0 ? lang.val(defaultValue, null) : types[type] ? types[type](value) : value;

Attachments

FileDateSize
app.js2012-05-18T03:30:41.000+0000148

Comments

  1. Ranando King 2012-05-06

    This might be related to a request I submitted. As I have not looked into the API source code, I'm not certain. But it seem it be the same problem. See
  2. Ranando King 2012-05-06

  3. Chris Barber 2012-05-18

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/2221
  4. Lee Morris 2017-03-21

    Closing ticket as fixed.

JSON Source