Skip to content

Commit

Permalink
fix dictionary missing definitions (oliverschwendener#282)
Browse files Browse the repository at this point in the history
* fix missing definitions (dictionary plugin)

* fix delay of main window hide

* fix code alignment

* Revert "fix code alignment"

This reverts commit 97f5aff.

* Revert "fix delay of main window hide"

This reverts commit e71788c.
  • Loading branch information
amrbashir authored Feb 10, 2020
1 parent 18c4005 commit 00d9670
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/plugins/dictionary-plugin/dictionary-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { capitalize } from "../../../common/helpers/string-helpers";

interface DictionaryResult {
definition: string;
example: string;
type: string;
synonyms: string[];
}
Expand Down Expand Up @@ -75,13 +74,11 @@ export class DictionaryPlugin implements ExecutionPlugin {
keys.forEach((key) => {
definition.meaning[key]
.filter((entry: any) => {
return entry.definition
&& entry.example;
return entry.definition;
})
.forEach((entry: any) => {
dictionaryResults.push({
definition: entry.definition,
example: entry.example,
synonyms: entry.synonyms ? entry.synonyms : [],
type: capitalize(key),
});
Expand Down

0 comments on commit 00d9670

Please sign in to comment.