Fossil SCM

Reinforce the previous for the case when access to non-existent field resolves to null (instead of undefined).

george 2021-04-26 19:26 vdiff-context-glob
Commit 8a7620e4a305f02822ab439b6d20ed9db6453e44d49ad12d81b26bc97e2892b3
1 file changed +1 -1
+1 -1
--- src/graph.js
+++ src/graph.js
@@ -572,11 +572,11 @@
572572
if( tx.fileDiff ){
573573
location.href=tx.baseUrl + "/fdiff?v1="+selRow.h+"&v2="+p.h;
574574
}else{
575575
var href = tx.baseUrl + "/vdiff?from="+selRow.h+"&to="+p.h;
576576
let params = (new URL(document.location)).searchParams;
577
- if(typeof params === "object"){
577
+ if(params && typeof params === "object"){
578578
/* When called from /timeline page, If chng=str was specified in the
579579
** QueryString, specify glob=str on the /vdiff page */
580580
let glob = params.get("chng");
581581
if( !glob ){
582582
/* When called from /vdiff page, keep the glob= QueryString if
583583
--- src/graph.js
+++ src/graph.js
@@ -572,11 +572,11 @@
572 if( tx.fileDiff ){
573 location.href=tx.baseUrl + "/fdiff?v1="+selRow.h+"&v2="+p.h;
574 }else{
575 var href = tx.baseUrl + "/vdiff?from="+selRow.h+"&to="+p.h;
576 let params = (new URL(document.location)).searchParams;
577 if(typeof params === "object"){
578 /* When called from /timeline page, If chng=str was specified in the
579 ** QueryString, specify glob=str on the /vdiff page */
580 let glob = params.get("chng");
581 if( !glob ){
582 /* When called from /vdiff page, keep the glob= QueryString if
583
--- src/graph.js
+++ src/graph.js
@@ -572,11 +572,11 @@
572 if( tx.fileDiff ){
573 location.href=tx.baseUrl + "/fdiff?v1="+selRow.h+"&v2="+p.h;
574 }else{
575 var href = tx.baseUrl + "/vdiff?from="+selRow.h+"&to="+p.h;
576 let params = (new URL(document.location)).searchParams;
577 if(params && typeof params === "object"){
578 /* When called from /timeline page, If chng=str was specified in the
579 ** QueryString, specify glob=str on the /vdiff page */
580 let glob = params.get("chng");
581 if( !glob ){
582 /* When called from /vdiff page, keep the glob= QueryString if
583

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button