fixed #4229 Javascript error in SQL edit window

Signed-off-by: Viduranga Wijesooriya <vpowerrc@gmail.com>
Merge pull request #857 from vpowerrc/bug-#4229

fixed #4229 Javascript error in SQL edit window