Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b30440e

Browse filesBrowse files
committed
feat: add warnings if user calls wrong icon name
1 parent b9747f1 commit b30440e
Copy full SHA for b30440e

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎src/CIconRaw.vue

Copy file name to clipboardExpand all lines: src/CIconRaw.vue
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ export default {
5252
if (this.content) {
5353
return this.content
5454
} else if (this.$root.$options.icons) {
55-
return this.$root.$options.icons[this.iconName]
55+
const icon = this.$root.$options.icons[this.iconName]
56+
if (!icon && process && process.env && process.env.NODE_ENV === 'development') {
57+
console.error('CIcon: "' + this.iconName + '" is not registered in $root.icons object. For CIcon docs visit https://coreui.io/vue/docs/components/icon.html')
58+
}
59+
return icon
5660
}
5761
},
5862
iconCode () {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.