浏览代码

Fix icon prefix for fontawesome5

mscherer 5 年之前
父节点
当前提交
e4ef6e1319
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/View/Helper/FormatHelper.php

+ 3 - 1
src/View/Helper/FormatHelper.php

@@ -352,7 +352,9 @@ class FormatHelper extends Helper {
 		$iconClass = $type;
 
 		$options += $this->_config;
-		if ($options['autoPrefix'] && $options['iconNamespace']) {
+		if ($options['autoPrefix'] && is_string($options['autoPrefix'])) {
+			$iconClass = $options['autoPrefix'] . '-' . $iconClass;
+		} elseif ($options['autoPrefix'] && $options['iconNamespace']) {
 			$iconClass = $options['iconNamespace'] . '-' . $iconClass;
 		}
 		if ($options['iconNamespace']) {