It is narrated from Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) that a man said: O Messenger of Allah! I had vowed that if Allah grants you the conquest of Makkah, I would go to Bayt al-Maqdis and pray there. The Prophet (peace and blessings of Allah be upon him) said: "Pray here (in the Ka'bah)." He repeated his question three times, then the Messenger of Allah (peace and blessings of Allah be upon him) said: "Now it is up to you" (meaning you have the choice to go to Bayt al-Maqdis and pray there and fulfill your vow).