Skip to content

Commit

Permalink
Bugfix im Data-Modul.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobMe committed Oct 4, 2016
1 parent 56df853 commit af82140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
19 changes: 3 additions & 16 deletions src/js/app/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,6 @@ var Data = (function() {
_dataScores = dataStored[_dictionaryAlias].scores;
_sizeScores = _dataScores.length;

// Prüfen, ob Wörterbuch existiert
var dictionaryExists = false;
$.each(_dataDictionaries, function(i, data) {
if (data.alias === _dictionaryAlias) {
dictionaryExists = true;
return true;
}
});

// Standard laden, falls Wörterbuch nicht existiert
if (!dictionaryExists) {
_loadDataStored(CFG.DATA.DEFAULT);
return false;
}

// Wörterbuch-Daten laden und speichern
if (typeof dictionary === typeof "") { _storeData(); }
_loadDataTerms();
Expand Down Expand Up @@ -202,9 +187,11 @@ var Data = (function() {
_dataTerms = data.terms;
_sizeTerms = data.terms.length;
}
}).done(function() {
}).success(function() {
_checkDictionaryFiles();
_updateDataFeatured();
}).error(function() {
_loadDataStored(CFG.DATA.DEFAULT);
});
}

Expand Down
Loading

0 comments on commit af82140

Please sign in to comment.