editor_chat: address a traceback when closing that I saw in production
editor_chat: address a traceback when closing that I saw in production

sagemathinc/smc,sagemathinc/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc