Correctly check for empty state when leaving editor early.

Fixes http://b/2112520 and http://b/2114480
1 file changed