🌐 AI搜索 & 代理 主页
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/utils/get.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import idendity from './identity'
import identity from './identity'
import { isArray, isObject } from './inspect'

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

const steps = path.split('.').filter(idendity)
const steps = path.split('.').filter(identity)

// Handle case where someone passes a string of only dots
if (steps.length === 0) {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/normalize-slot.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import idendity from './identity'
import identity from './identity'
import { concat } from './array'
import { isFunction } from './inspect'

Expand All @@ -17,7 +17,7 @@ import { isFunction } from './inspect'
*/
const hasNormalizedSlot = (names, $scopedSlots = {}, $slots = {}) => {
// Ensure names is an array
names = concat(names).filter(idendity)
names = concat(names).filter(identity)
// Returns true if the either a $scopedSlot or $slot exists with the specified name
return names.some(name => $scopedSlots[name] || $slots[name])
}
Expand All @@ -33,7 +33,7 @@ const hasNormalizedSlot = (names, $scopedSlots = {}, $slots = {}) => {
*/
const normalizeSlot = (names, scope = {}, $scopedSlots = {}, $slots = {}) => {
// Ensure names is an array
names = concat(names).filter(idendity)
names = concat(names).filter(identity)
let slot
for (let i = 0; i < names.length && !slot; i++) {
const name = names[i]
Expand Down