We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
isCreateElement
1 parent 5baa3e0 commit d9a51afCopy full SHA for d9a51af
lib/util/isCreateElement.js
@@ -10,13 +10,12 @@ const isDestructuredFromPragmaImport = require('./isDestructuredFromPragmaImport
10
* @returns {Boolean} - True if node is a createElement call object literal, False if not.
11
*/
12
module.exports = function isCreateElement(node, context) {
13
- const pragma = pragmaUtil.getFromContext(context);
14
if (
15
node.callee
16
&& node.callee.type === 'MemberExpression'
17
&& node.callee.property.name === 'createElement'
18
&& node.callee.object
19
- && node.callee.object.name === pragma
+ && node.callee.object.name === pragmaUtil.getFromContext(context)
20
) {
21
return true;
22
}
0 commit comments