Init vars with a value if none is provided
Merge pull request #10637 from owncloud/fixing-js-issues

Init vars with a value if none is provided