mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
refactor: replace deprecated String.prototype.substr() (#10432)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@ exports.buildReqObject = (req, payload) => {
|
||||
protocol: encrypted ? 'https' : 'http',
|
||||
secure: encrypted,
|
||||
url: referer,
|
||||
path: referer.substr(referer.indexOf(host) + host.length),
|
||||
path: referer.slice(referer.indexOf(host) + host.length),
|
||||
headers: headers,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user