We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e10a69b commit 9220bcbCopy full SHA for 9220bcb
src/index.js
@@ -195,7 +195,7 @@ function getComponentName(component) {
195
196
function getFallbackComponentName(component) {
197
let str = Function.prototype.toString.call(component),
198
- name = (str.match(/^\s*function\s+([^\( ]+)/) || EMPTY)[1];
+ name = (str.match(/^\s*function\s+([^( ]+)/) || '')[1];
199
if (!name) {
200
// search for an existing indexed name for the given component:
201
let index = -1;
test/jsx.js
@@ -1,5 +1,5 @@
1
import render from '../src/jsx';
2
-import { h, Component } from 'preact';
+import { h } from 'preact';
3
import chai, { expect } from 'chai';
4
import sinonChai from 'sinon-chai';
5
chai.use(sinonChai);
0 commit comments