Bug 228432 Warning `reference to undefined property selection.item[0]'' [xs] in file `chrome://communicator/content/bookmarks/bookmarksTree.xml'', line 641, character 0.

r=neil sr=bz


git-svn-id: svn://10.0.0.236/trunk@151350 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2004-01-15 02:57:15 +00:00
parent 894114d07d
commit fd8ddae87e

View File

@@ -638,11 +638,14 @@
{
var selection = this.mOuter.getTreeSelection();
this.mOuter._selection = selection;
this.mOuter._target = this.mOuter.getTreeTarget(selection.item[0], selection.parent[0], BookmarksUtils.DROP_BEFORE);
var selectionLength = selection.length;
this.mOuter._target = selectionLength
? this.mOuter.getTreeTarget(selection.item[0], selection.parent[0], BookmarksUtils.DROP_BEFORE)
: null;
this.mOuter.onCommandUpdate();
const kStatusBar = document.getAnonymousElementByAttribute(this.mOuter, "anonid", "statusbar-text");
var displayValue;
if (kStatusBar && selection.length == 1) {
if (kStatusBar && selectionLength == 1) {
var protocol = selection.protocol[0];
if (selection.isContainer[0] && protocol != "find" && protocol != "file") {
RDFC.Init(this.mOuter.db, selection.item[0]);