Replace empty array with undef, because if() in template evaluates [] as true
Merge pull request #1 from djotto/bugfix

Replace empty array with undef