Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26452

iOS: Object.hasProperty incorrectly reports false when a property's value is null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 7.5.0
    • Fix Version/s: Release 7.5.1
    • Component/s: iOS
    • Labels:
      None

      Description

      With the new KrollHasProperty tweaks, asking Ti proxies for property existence is generally better (doesn't always return true!). However, in the edge case where a property is defined but has no value (nil natively) it will report the property doesn't exist. This is because the implementation is generally naive in that it asks for the value for a given key and checks against nil.

      The easiest way to test this is to query for Ti.Geolocation's lastGeolocation property in a mocha/should test:

      should(Ti.Geolocation).have.property('lastGeolocation');
      

        Attachments

          Activity

            People

            • Assignee:
              jvennemann Jan Vennemann
              Reporter:
              cwilliams Christopher Williams
              Reviewer:
              Christopher Williams
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6625
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code