babel-plugin-jsx-dom-expressions 0.30.8 → 0.30.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -319,12 +319,13 @@ function isDynamic(path, { checkMember, checkTags, checkCallExpressions = true,
319
319
 
320
320
  function getStaticExpression(path) {
321
321
  const node = path.node;
322
- let value;
322
+ let value, type;
323
323
  return (
324
324
  t__namespace.isJSXExpressionContainer(node) &&
325
325
  t__namespace.isJSXElement(path.parent) &&
326
326
  !isComponent(getTagName(path.parent)) &&
327
327
  (value = path.get("expression").evaluate().value) !== undefined &&
328
+ ((type = typeof value) === "string" || type === "number") &&
328
329
  value
329
330
  );
330
331
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "babel-plugin-jsx-dom-expressions",
3
3
  "description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
4
- "version": "0.30.8",
4
+ "version": "0.30.9",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "@babel/types": "^7.11.5",
24
24
  "html-entities": "2.3.2"
25
25
  },
26
- "gitHead": "b8381ac126158615afb3438a31c8c35204a0cfaf"
26
+ "gitHead": "a31ebd7b178840291107cb7156157f6df74524b2"
27
27
  }