Skip to content

Commit

Permalink
fix(lint): improve code style
Browse files Browse the repository at this point in the history
Former-commit-id: 1619bc0
  • Loading branch information
ci010 committed Jul 15, 2019
1 parent e3a3b89 commit a071cf9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/renderer/windows/main/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export default {
break;
case 'incompatibleJava':
if (this.$repo.state.java.all.some(j => j.majorVersion === 8)) {
await this.$repo.dispatch('editProfile', { java: this.$repo.state.java.all.find(j => j.majorVersion === 8) })
await this.$repo.dispatch('editProfile', { java: this.$repo.state.java.all.find(j => j.majorVersion === 8) });
} else {
await this.$refs.jwizard.display(this.$t('java.incompatibleJava'), this.$t('java.incompatibleJavaHint'));
}
Expand Down
5 changes: 1 addition & 4 deletions src/renderer/windows/main/components/JavaWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ export default {
handle = await this.$repo.dispatch('installJava', true);
this.show = false;
this.$emit('task');
const self = this;
const $repo = this.$repo;
const task = $repo.state.task.tree[handle];
this.items = task.tasks;
this.items = this.$repo.state.task.tree[handle].tasks;
try {
await this.$repo.dispatch('waitTask', handle);
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/windows/main/components/TaskDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default {
this.$menu([{ title: 'hello', onClick() { } }], event.clientX, event.clientY);
},
onTaskClick(event, item) {
this.$electron.clipboard.writeText(item.message)
this.$electron.clipboard.writeText(item.message);
},
setHoverState(id, state) {
Vue.set(this.hovered, id, state);
Expand Down
5 changes: 2 additions & 3 deletions src/universal/utils/object.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* @param {any} object
* @param {string} [message]
Expand Down Expand Up @@ -42,8 +41,8 @@ export function willBaselineChange(baseline, option) {

if (!isNullOrUndefine(optionValue)) {
if (typeof stateValue === 'object') {
if (stateValue instanceof Array && optionValue instanceof Array &&
stateValue.some((v, i) => v !== optionValue[i])) {
if (stateValue instanceof Array && optionValue instanceof Array
&& stateValue.some((v, i) => v !== optionValue[i])) {
return true;
}
if (typeof optionValue === 'object' && willBaselineChange(stateValue, optionValue)) {
Expand Down

0 comments on commit a071cf9

Please sign in to comment.