Sorting an array of objects by a property which may be missing Problem

I am sorting an array of objects. Each element may have a property called reference or it may be undefined. When defined, it is a user-provided string (which is why I use String.localeCompare()).

If the reference is not available, that element's relative position in the final list is irrelevant save that all blank references must appear grouped together at the end.

Implementation

function sort(searchResult) {
    const hasReference = searchResult
        .filter(taskCard =&gt; typeof taskCard.reference !== "undefined");

    const missingReference = searchResult
        .filter(taskCard =&gt; typeof taskCard.reference === "undefined");

    hasReference.sort(
        (tc1, tc2) =&gt; tc1.reference.localeCompare(tc2.reference)
    );

    return hasReference.concat(missingReference);
}


My Concerns


Is this an efficient way of solving this problem in terms of time?
I'm currently iterating over the initial array twice. Is there an elegant ES6 way to do this in a single pass that I'm not seeing?
I believe memory to be less of a concern (because I exactly double the amount of memory used while processing by generating two new arrays that together are the size of the original); am I correct?
Are there any scalability pitfalls doing it this way?
As usual, any other comments are welcome.
Here's a single-pass example. Very similar to @janos' code (which has a good complexity analysis). The only difference is in how various cases with undefined are treated.

function sort(searchResult) {
  return searchResult.sort((tc1, tc2) =&gt; {

    const tc1RefUndefined = tc1.reference == null;
    const tc2RefUndefined = tc2.reference == null;
    if (tc1RefUndefined || tc2RefUndefined) {
      if (tc1RefUndefined &amp;&amp; tc2RefUndefined) {
        return 0;

        // or if consistency in grouping (within the groups) is necessary:
        // return tc1.otherProperty comparedTo tc2.otherProperty
      } else if (tc1RefUndefined) {
        return -1;
      } else {
        return 1;
      }
    }

    return tc1.reference.localeCompare(tc2.reference);
  });
}