Swap deprecated Promise.cast for Promise.resolve