🌐 AI搜索 & 代理 主页
Skip to content

Commit 7fed191

Browse files
authored
fix(utils): correct identity spelling error (#4579)
1 parent 56b8472 commit 7fed191

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/utils/get.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import idendity from './identity'
1+
import identity from './identity'
22
import { isArray, isObject } from './inspect'
33

44
const RX_ARRAY_NOTATION = /\[(\d+)]/g
@@ -33,7 +33,7 @@ const get = (obj, path, defaultValue = null) => {
3333
// Handle string array notation (numeric indices only)
3434
path = String(path).replace(RX_ARRAY_NOTATION, '.$1')
3535

36-
const steps = path.split('.').filter(idendity)
36+
const steps = path.split('.').filter(identity)
3737

3838
// Handle case where someone passes a string of only dots
3939
if (steps.length === 0) {

src/utils/normalize-slot.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import idendity from './identity'
1+
import identity from './identity'
22
import { concat } from './array'
33
import { isFunction } from './inspect'
44

@@ -17,7 +17,7 @@ import { isFunction } from './inspect'
1717
*/
1818
const hasNormalizedSlot = (names, $scopedSlots = {}, $slots = {}) => {
1919
// Ensure names is an array
20-
names = concat(names).filter(idendity)
20+
names = concat(names).filter(identity)
2121
// Returns true if the either a $scopedSlot or $slot exists with the specified name
2222
return names.some(name => $scopedSlots[name] || $slots[name])
2323
}
@@ -33,7 +33,7 @@ const hasNormalizedSlot = (names, $scopedSlots = {}, $slots = {}) => {
3333
*/
3434
const normalizeSlot = (names, scope = {}, $scopedSlots = {}, $slots = {}) => {
3535
// Ensure names is an array
36-
names = concat(names).filter(idendity)
36+
names = concat(names).filter(identity)
3737
let slot
3838
for (let i = 0; i < names.length && !slot; i++) {
3939
const name = names[i]

0 commit comments

Comments
 (0)