File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,8 +32,11 @@ process.on('unhandledRejection', up => {
3232 console . error ( up ) ;
3333 throw up
3434} ) ;
35- function isNumeric ( n ) {
36- return ! isNaN ( parseFloat ( n ) ) && isFinite ( n ) ;
35+ // function isNumeric(n) {
36+ // return !isNaN(parseFloat(n)) && isFinite(n);
37+ // }
38+ function isNumeric ( val ) {
39+ return Number ( parseFloat ( val ) ) === val ;
3740}
3841( async function ( ) : Promise < void > {
3942 try {
@@ -42,8 +45,9 @@ function isNumeric(n) {
4245
4346 var q : SigninMessage = new SigninMessage ( ) ;
4447 var user = new TokenUser ( ) ;
45- user . name = "nodered" + Config . nodered_id ;
46- if ( ! isNumeric ( Config . nodered_id ) ) {
48+ if ( isNumeric ( Config . nodered_id ) ) {
49+ user . name = "nodered" + Config . nodered_id ;
50+ } else {
4751 user . name = Config . nodered_id ;
4852 }
4953 user . username = user . name ;
Original file line number Diff line number Diff line change 1- 0.0.171
1+ 0.0.172
You can’t perform that action at this time.
0 commit comments