From caad9cade485e902a07eddf87847ae52bbaf3848 Mon Sep 17 00:00:00 2001 From: "morse%netscape.com" Date: Thu, 26 Apr 2001 07:36:17 +0000 Subject: [PATCH] bug 70955, fix js warning message, r=law, sr=alecf --- extensions/wallet/resources/content/walletOverlay.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extensions/wallet/resources/content/walletOverlay.js b/extensions/wallet/resources/content/walletOverlay.js index 194389fca7b4..ebdc9e3f9f03 100644 --- a/extensions/wallet/resources/content/walletOverlay.js +++ b/extensions/wallet/resources/content/walletOverlay.js @@ -233,6 +233,11 @@ if (!window._content || !window._content.document) { return hide; } + var document = window._content.document; + if (!("forms" in document)) { + // this will occur if document is xul document instead of html document for example + return hide; + } // test for wallet service being available var walletService = Components.classes["@mozilla.org/wallet/wallet-service;1"] @@ -266,7 +271,7 @@ } // process top-level document - formsArray = window._content.document.forms; + formsArray = document.forms; state = getStateFromFormsArray(formsArray, captureOrPrefill, threshhold, walletService); if (state == enable) {