handle the resolved-with-promise case correctly