scripting: the if statement is redundant

Change-Id: I7e61d740d6f58afbcdad630deb0de0ef548efcfb
Reviewed-on: https://gerrit.libreoffice.org/11288
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>