diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index b10e2157c1b..3a82a05aebf 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -3152,7 +3152,8 @@ namespace winrt::TerminalApp::implementation TerminalConnection::ITerminalConnection existingConnection) { - if (const auto& newTerminalArgs{ contentArgs.try_as() }) + const auto& newTerminalArgs{ contentArgs.try_as() }; + if (contentArgs == nullptr || newTerminalArgs != nullptr || contentArgs.Type().empty()) { // Terminals are of course special, and have to deal with debug taps, duplicating the tab, etc. return _MakeTerminalPane(newTerminalArgs, sourceTab, existingConnection);