diff --git a/lib/util/isCreateElement.js b/lib/util/isCreateElement.js index 48ab7a566f..c28dc563fb 100644 --- a/lib/util/isCreateElement.js +++ b/lib/util/isCreateElement.js @@ -10,13 +10,12 @@ const isDestructuredFromPragmaImport = require('./isDestructuredFromPragmaImport * @returns {Boolean} - True if node is a createElement call object literal, False if not. */ module.exports = function isCreateElement(node, context) { - const pragma = pragmaUtil.getFromContext(context); if ( node.callee && node.callee.type === 'MemberExpression' && node.callee.property.name === 'createElement' && node.callee.object - && node.callee.object.name === pragma + && node.callee.object.name === pragmaUtil.getFromContext(context) ) { return true; }