Fixed a bug where texts were not updated after loading a different sheet.

This commit is contained in:
Yord 2015-10-19 17:50:06 +02:00
parent 3de4febe45
commit 84b63ce498
5 changed files with 402 additions and 83 deletions

View file

@ -14,19 +14,19 @@ var ikrpg = ikrpg || {};
// # Manage characters # \\
(function() {
var db2 = new PouchDB('characters.ikrpg');
var hero = ikrpg.cards.data;
listCharacters();
function saveHero() {
ikrpg.cards.updateData();
hero = ikrpg.cards.data;
var _id = hero["hero-name"].replace(/["']/g, "");
db2.get(_id, function(error, doc) {
if(error) { // hero not in db yet
doc = hero;