Fix an issue when the editor has no docmuents.