mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
use replace instead of replaceAll to support node14
This commit is contained in:
parent
f917212d67
commit
ed2c9d24e8
@ -100,7 +100,7 @@ RED.settings = (function () {
|
|||||||
var init = function (options, done) {
|
var init = function (options, done) {
|
||||||
var accessTokenMatch = /[?&]access_token=(.*?)(?:$|&)/.exec(window.location.search);
|
var accessTokenMatch = /[?&]access_token=(.*?)(?:$|&)/.exec(window.location.search);
|
||||||
var path=window.location.pathname.slice(0,-1);
|
var path=window.location.pathname.slice(0,-1);
|
||||||
RED.settings.authTokensSuffix=path.replaceAll('/', '-');
|
RED.settings.authTokensSuffix=path.replace(/\//g, '-');
|
||||||
if (accessTokenMatch) {
|
if (accessTokenMatch) {
|
||||||
var accessToken = accessTokenMatch[1];
|
var accessToken = accessTokenMatch[1];
|
||||||
RED.settings.set("auth-tokens",{access_token: accessToken});
|
RED.settings.set("auth-tokens",{access_token: accessToken});
|
||||||
|
Loading…
Reference in New Issue
Block a user