Mode handling fix for cmv3

While fixing similar code in my Quick Markup extension, I noticed this code checking for mode that is no longer defined in CodeMirror V3. All unit, integration, and extension tests pass in master, so this case does not seem to have a test for it.

@RaymondLim I seem to remember that you added this code, but I can't remember the case that it fixes, so can you verify this change? Also, should we add a test for this case?