File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 517
517
history . replaceState ( { "pattern" : patternName } , null , null ) ;
518
518
}
519
519
520
- if ( document . getElementById ( "sg-raw" ) !== undefined ) {
520
+ if ( document . getElementById ( "sg-raw" ) !== null ) {
521
521
document . getElementById ( "sg-raw" ) . setAttribute ( "href" , urlHandler . getFileName ( patternName ) ) ;
522
522
}
523
523
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ var urlHandler = {
153
153
history . pushState ( data , null , addressReplacement ) ;
154
154
}
155
155
document . getElementById ( "title" ) . innerHTML = "Pattern Lab - " + pattern ;
156
- if ( document . getElementById ( "sg-raw" ) !== undefined ) {
156
+ if ( document . getElementById ( "sg-raw" ) !== null ) {
157
157
document . getElementById ( "sg-raw" ) . setAttribute ( "href" , urlHandler . getFileName ( pattern ) ) ;
158
158
}
159
159
}
@@ -184,7 +184,9 @@ var urlHandler = {
184
184
var obj = JSON . stringify ( { "event" : "patternLab.updatePath" , "path" : iFramePath } ) ;
185
185
document . getElementById ( "sg-viewport" ) . contentWindow . postMessage ( obj , urlHandler . targetOrigin ) ;
186
186
document . getElementById ( "title" ) . innerHTML = "Pattern Lab - " + patternName ;
187
- document . getElementById ( "sg-raw" ) . setAttribute ( "href" , urlHandler . getFileName ( patternName ) ) ;
187
+ if ( document . getElementById ( "sg-raw" ) !== null ) {
188
+ document . getElementById ( "sg-raw" ) . setAttribute ( "href" , urlHandler . getFileName ( patternName ) ) ;
189
+ }
188
190
189
191
/*
190
192
if (wsnConnected !== undefined) {
You can’t perform that action at this time.
0 commit comments