Skip to content

Commit 84fecb7

Browse files
committed
Import only the needed things from lodash
1 parent fce394f commit 84fecb7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

resources/assets/scripts/components/dashboard/Dashboard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<script>
3131
import Server from '../../models/server';
32-
import _ from 'lodash';
32+
import debounce from 'lodash/debounce';
3333
import differenceInSeconds from 'date-fns/difference_in_seconds';
3434
import Flash from '../Flash';
3535
import ServerBox from './ServerBox';
@@ -112,7 +112,7 @@
112112
* Handle a search for servers but only call the search function every 500ms
113113
* at the fastest.
114114
*/
115-
onChange: _.debounce(function () {
115+
onChange: debounce(function () {
116116
this.loadServers(this.$data.search);
117117
}, 500),
118118

resources/assets/scripts/components/dashboard/account/UpdateEmail.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</template>
2626

2727
<script>
28-
import _ from 'lodash';
28+
import isObject from 'lodash/isObject';
2929
import { mapState, mapActions } from 'vuex';
3030
3131
export default {
@@ -62,7 +62,7 @@
6262
}
6363
6464
const response = error.response;
65-
if (response.data && _.isObject(response.data.errors)) {
65+
if (response.data && isObject(response.data.errors)) {
6666
response.data.errors.forEach(e => {
6767
this.error(e.detail);
6868
});

0 commit comments

Comments
 (0)