From 75877deb8167c0fa3e0731851755f808a0c1c371 Mon Sep 17 00:00:00 2001 From: Joe Walker Date: Tue, 17 Mar 2015 13:42:25 +0000 Subject: [PATCH] runat-1128988: Be defensive about domSheet.ownerNode Signed-off-by: Joe Walker --- lib/gcli/types/resource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gcli/types/resource.js b/lib/gcli/types/resource.js index d84fd953..67a5b60d 100644 --- a/lib/gcli/types/resource.js +++ b/lib/gcli/types/resource.js @@ -53,7 +53,7 @@ Resource.TYPE_CSS = 'text/css'; function CssResource(domSheet) { this.name = domSheet.href; if (!this.name) { - this.name = domSheet.ownerNode.id ? + this.name = domSheet.ownerNode && domSheet.ownerNode.id ? 'css#' + domSheet.ownerNode.id : 'inline-css'; }