It’s not easy to answer, as posted only parts of the code (for example: you call the sortColors() but we don’t know what this function does. + the issue can be somewhere else in the code you haven’t posted).
One comment: you don’t need the await (but the problem is somewhere else).