Skip to content
Permalink
Browse files

fix(utils): correct `identity` spelling error (#4579)

  • Loading branch information
jackmu95 committed Jan 9, 2020
1 parent 56b8472 commit 7fed1911d6d9f7eae81526010483c71e1679e770
Showing with 5 additions and 5 deletions.
  1. +2 −2 src/utils/get.js
  2. +3 −3 src/utils/normalize-slot.js
@@ -1,4 +1,4 @@
import idendity from './identity'
import identity from './identity'
import { isArray, isObject } from './inspect'

const RX_ARRAY_NOTATION = /\[(\d+)]/g
@@ -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) {
@@ -1,4 +1,4 @@
import idendity from './identity'
import identity from './identity'
import { concat } from './array'
import { isFunction } from './inspect'

@@ -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])
}
@@ -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]

0 comments on commit 7fed191

Please sign in to comment.
You can’t perform that action at this time.