j-component 1.4.5 → 1.4.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "j-component",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "miniprogram custom component framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -117,6 +117,7 @@ class SelectorQuery {
117
117
  const itemResList = []
118
118
 
119
119
  for (const node of nodes) {
120
+ if (!node) continue
120
121
  const itemRes = {}
121
122
 
122
123
  if (fields.id) {
@@ -166,7 +167,7 @@ class SelectorQuery {
166
167
  itemResList.push(itemRes)
167
168
  }
168
169
 
169
- res.push(isSelectSingle ? itemResList[0] : itemResList)
170
+ res.push(isSelectSingle ? (itemResList[0] || null) : itemResList)
170
171
  }
171
172
 
172
173
  if (typeof this._queueCallback[index] === 'function') this._queueCallback[index].call(this, res[index])