Launcher: fix javascript issue when the launch of an application fails

Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>