scripting: The if statement is redundant

Change-Id: Ia6186be4ed48fd75d1063eed233a88e09b675bf1
Reviewed-on: https://gerrit.libreoffice.org/11774
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>