Fix code editor empty issue

Fixes RM-2699