We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
console.error
throw new Error
1 parent 0d342b3 commit 3a3df71Copy full SHA for 3a3df71
src/replace.js
@@ -32,13 +32,11 @@ function replaceElement(element, options) {
32
const key = element.getAttribute('data-feather');
33
34
if (!key) {
35
- console.error('The required `data-feather` attribute has no value.');
36
- return;
+ throw new Error('The required `data-feather` attribute has no value.');
37
}
38
39
if (!icons[key]) {
40
- console.error(`No icon matching '${key}'. See the complete list of icons at https://feathericons.com`);
41
+ throw new Error(`No icon matching '${key}'. See the complete list of icons at https://feathericons.com`);
42
43
44
const elementClassAttr = element.getAttribute('class') || '';
0 commit comments