Skip to content

Commit 874cef8

Browse files
save file
1 parent dc0bd1b commit 874cef8

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

utils/misc/global-state-diff/v2.0/global-state-diff-v2.0.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145

146146

147147
#hdr
148-
{display:flex;margin-bottom:10px}
148+
{display:flex}
149149

150150
#info
151151
{margin-bottom:10px}
@@ -154,7 +154,7 @@
154154
{font-weight:bold;margin-bottom:10px}
155155

156156
#values
157-
{white-space:pre}
157+
{white-space:pre;margin-top:10px}
158158
#values.error
159159
{color:red}
160160

@@ -673,21 +673,23 @@ <h3>
673673
var isBrowser = /window\.|document\.|navigator\./.test(code);
674674

675675

676-
var type = 'Unknown';
676+
var type = [];
677677
if (isESM){
678-
type = 'ESM';
678+
type.push('ESM');
679679
}
680680
if(isCommonJS){
681-
type = 'CommonJS';
681+
type.push('CommonJS');
682682
}
683683

684684
if(isNode){
685-
type += ' ( Node.js )';
685+
type.push('Node.js');
686686
}
687687
if(isBrowser){
688-
type += ' ( Browser )';
688+
type.push('Browser');
689689
}
690+
type = type.join(',')
690691

692+
type ||= 'unknown';
691693
return type;
692694

693695
}//detect

0 commit comments

Comments
 (0)