ClojureScript

Empty arrays and strings don't seq as nil

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

This is in CLJS v. 0.0-1803

The original symptom was that these objects didn't round-trip properly:

cljs.user=> (js->clj (clj->js {}))
{"" nil}

A little more digging shows the underlying issue:

cljs.user=> (seq (array)) 
(nil)

The same issue, with the same fix, exists for strings, so I'm including that here as well.

Activity

Hide
Colin Jones added a comment -

Nice, thanks for cleaning up that test. Sorry about that, still working on interpreting the test output.

Show
Colin Jones added a comment - Nice, thanks for cleaning up that test. Sorry about that, still working on interpreting the test output.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: