@plumeria/utils 19.1.9 → 19.1.10

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/dist/transform.js +11 -14
  2. package/package.json +1 -1
package/dist/transform.js CHANGED
@@ -2010,24 +2010,21 @@ const transformSource = async (env) => {
2010
2010
  if (node.name.type !== 'Identifier')
2011
2011
  return;
2012
2012
  const attrName = node.name.value;
2013
- let compKey = null;
2014
- for (const [, val] of jsxOpeningElementMap) {
2015
- const found = val.attributes
2016
- .filter((a) => a.type === 'JSXAttribute')
2017
- .find((a) => a.span.start === node.span.start);
2018
- if (found) {
2019
- compKey = val.compKey;
2020
- break;
2013
+ if (attrName !== styleProp) {
2014
+ let compKey = null;
2015
+ for (const [, val] of jsxOpeningElementMap) {
2016
+ const found = val.attributes
2017
+ .filter((a) => a.type === 'JSXAttribute')
2018
+ .find((a) => a.span.start === node.span.start);
2019
+ if (found) {
2020
+ compKey = val.compKey;
2021
+ break;
2022
+ }
2021
2023
  }
2022
- }
2023
- const relayed = compKey
2024
- ? scannedTables.componentPropsTable?.[compKey]?.[attrName]
2025
- : undefined;
2026
- if (attrName !== styleProp || relayed) {
2027
2024
  if (compKey) {
2028
2025
  if (node.value?.type === 'JSXExpressionContainer')
2029
2026
  assertNoStyleArraySpread(node.value.expression);
2030
- const list = relayed;
2027
+ const list = scannedTables.componentPropsTable?.[compKey]?.[attrName];
2031
2028
  if (list &&
2032
2029
  node.value &&
2033
2030
  node.value.type === 'JSXExpressionContainer') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/utils",
3
- "version": "19.1.9",
3
+ "version": "19.1.10",
4
4
  "description": "Plumeria Utils",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",