When no communities are detected, put all nodes in the same community.

louvain detection may not find any communities if there are very few vertices or edges.