Fix the trash button in toolbar not always working

This commit is contained in:
yflory
2017-02-14 10:56:38 +01:00
parent aae3fba284
commit 92050eb04f
3 changed files with 6 additions and 1 deletions

View File

@@ -400,6 +400,7 @@ define([
};
var getRelativeHref = common.getRelativeHref = function (href) {
if (!href) { return; }
var parsed = common.parsePadUrl(href);
return '/' + parsed.type + '/#' + parsed.hash;
};
@@ -563,7 +564,7 @@ define([
};
if (typeof(getStore().forgetPad) === "function") {
getStore().forgetPad(href, callback);
getStore().forgetPad(common.getRelativeHref(href), callback);
}
};