Guard against empty editor in getting all folds. Fixes the build