mirror of
https://github.com/youzan/vant.git
synced 2025-12-20 01:01:34 +08:00
[Improvement] Support Vue.use to register a component (#401)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
import { isDef } from './';
|
||||
|
||||
const { hasOwnProperty } = Object.prototype;
|
||||
|
||||
function isObj(x) {
|
||||
const type = typeof x;
|
||||
@@ -8,12 +10,7 @@ function isObj(x) {
|
||||
function assignKey(to, from, key) {
|
||||
const val = from[key];
|
||||
|
||||
if (
|
||||
val === undefined ||
|
||||
val === null ||
|
||||
(hasOwnProperty.call(to, key) &&
|
||||
(to[key] === undefined || to[key] === null))
|
||||
) {
|
||||
if (!isDef(val) || (hasOwnProperty.call(to, key) && !isDef(to[key]))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user