Avoid to write the links array if empty.