fixed #4229 Javascript error in SQL edit window

Signed-off-by: Viduranga Wijesooriya <vpowerrc@gmail.com>