This entire `if` statement was redundant and has been removed. The code below checks for `editor` and `editor._codeMirror` before calling `queryPreviewProviders()`.