Skip to content

Commit

Permalink
Fix deepClone export
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Dulisz committed Jul 31, 2016
1 parent 7de4345 commit 6806607
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/multiselectMixin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepClone } from './utils'
import deepClone from './utils'

module.exports = {
data () {
Expand Down
4 changes: 3 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copied from Vuex.
* @type {Object}
*/
export function deepClone (obj) {
const deepClone = function (obj) {
if (Array.isArray(obj)) {
return obj.map(deepClone)
} else if (obj && typeof obj === 'object') {
Expand All @@ -18,3 +18,5 @@ export function deepClone (obj) {
return obj
}
}

module.exports = deepClone
2 changes: 1 addition & 1 deletion lib/vue-multiselect.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/vue-multiselect.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import Multiselect from './Multiselect'
import multiselectMixin from './multiselectMixin'
import pointerMixin from './pointerMixin'
import utils from './utils'
import deepClone from './utils'

export default Multiselect

export { Multiselect, multiselectMixin, pointerMixin, utils }
export { Multiselect, multiselectMixin, pointerMixin, deepClone }
2 changes: 1 addition & 1 deletion src/multiselectMixin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepClone } from './utils'
import deepClone from './utils'

module.exports = {
data () {
Expand Down
4 changes: 3 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copied from Vuex.
* @type {Object}
*/
export function deepClone (obj) {
const deepClone = function (obj) {
if (Array.isArray(obj)) {
return obj.map(deepClone)
} else if (obj && typeof obj === 'object') {
Expand All @@ -18,3 +18,5 @@ export function deepClone (obj) {
return obj
}
}

module.exports = deepClone

0 comments on commit 6806607

Please sign in to comment.