Fixed incorrect checking of props when props['precommit'] is not set.