How does the sentence end?

He took the treat out of his pocket and placed it in his bag so it wouldn't melt, as the
bag was cool inside.