Bug Fix #4417,#4403: Single-clicking a foreign key causes JavaScript error

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>