Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1425

Error creating an object with a property of array of strings

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: Q3-24FY
    • Component/s: None

      In my case updating to that alpha generates an error when creating an object with a property of array of strings, ie:

      Unable to find source-code formatter for language: ts. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      realm.create(
                'Entity',
                {categories: ['personal']},
                UpdateMode.Modified
              );
      

      gives:

      Error: Exception in HostFunction: Entity.categories must be of type 'string[]', got 'object' (personal), js engine: hermes

      but, interestingly, everything persists correctly.

      But the good news is that now Realm works perfectly with Reanimated 2, reload works without a crash, so I believe that issue could be closed soon: https://github.com/software-mansion/react-native-reanimated/issues/1424

      _Originally posted by @somebody32 in https://github.com/realm/realm-js/discussions/3978#discussioncomment-1604048_

            Assignee:
            Unassigned Unassigned
            Reporter:
            kraen.hansen@mongodb.com Kræn Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: