Log1x / poet

Configuration-based post type, taxonomy, block category, and block registration for Sage 10.

Home Page:https://github.com/Log1x/poet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

registerPalette with config 'palette' => true fails

dsturm opened this issue · comments

Hi,

since the config values are mapped into a collection,

[
      'palette' => true
]

will be mapped into

[
      'palette' => Illuminate\Support\Collection {
            #items: array:1 [
                  0 => true
            ]
      }
]

Therefor

(is_bool($palette = $this->config->get('palette')) && $palette === true) ||

cannot be true.

Good catch! I'll push a fix later today or tonight after I finish the new ACF Composer release.

Thanks :-) First I thought to get the value by $this->config->get('palette')->first(), but this would break to be able to use a string as the palettes´ file name.