mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-01 08:43:33 +02:00
Just explicitly check bookmark node URIs for nullness. How does this even happen?
This commit is contained in:
@@ -60,20 +60,15 @@ const Bookmarks = Module("bookmarks", {
|
|||||||
this.__iterator__ = function () (val for ([, val] in Iterator(self.bookmarks)));
|
this.__iterator__ = function () (val for ([, val] in Iterator(self.bookmarks)));
|
||||||
|
|
||||||
function loadBookmark(node) {
|
function loadBookmark(node) {
|
||||||
try {
|
if (node.uri == null) // How does this happen?
|
||||||
let uri = util.newURI(node.uri);
|
return false;
|
||||||
let keyword = bookmarksService.getKeywordForBookmark(node.itemId);
|
let uri = util.newURI(node.uri);
|
||||||
let tags = tagging.getTagsForURI(uri, {}) || [];
|
let keyword = bookmarksService.getKeywordForBookmark(node.itemId);
|
||||||
let bmark = new Bookmark(node.uri, node.title, node.icon && node.icon.spec, keyword, tags, node.itemId);
|
let tags = tagging.getTagsForURI(uri, {}) || [];
|
||||||
|
let bmark = new Bookmark(node.uri, node.title, node.icon && node.icon.spec, keyword, tags, node.itemId);
|
||||||
|
|
||||||
bookmarks.push(bmark);
|
bookmarks.push(bmark);
|
||||||
return bmark;
|
return bmark;
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
liberator.dump("Failed to create bookmark for URI: " + node.uri);
|
|
||||||
liberator.reportError(e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function readBookmark(id) {
|
function readBookmark(id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user