Shadowing declaration of 'version' in jstest

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Workload Scheduling
    • ALL
    • Service Arch 2023-12-25, Service Arch 2024-01-08, Service Arch 2024-01-22, Service Arch 2024-02-05, Service Arch 2024-02-19, Service Arch 2024-03-04, Service Arch 2024-03-18, Service Arch 2024-04-01, Service Arch 2024-04-15, Service Arch 2024-04-29, Workload Scheduling 2024-05-27, Workload Scheduling 2024-06-10, Workload Scheduling 2024-06-24, Workload Scheduling 2024-07-08, Workload Scheduling 2024-07-22
    • 153
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We recently had an issue where a jstest introduced the following code : 

      const version = db.version().split('.');

      Which resulted in 

      ReferenceError: can't access lexical declaration 'version' before initialization

      (see this comment for more details)

      This seems to be caused because globalThis.connect uses version() instead of globalThis.version().

      We should fix this by calling globalThis.version() here instead.

       

            Assignee:
            Matt Broadstone
            Reporter:
            Mathis Bessa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: