mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: enable no-unused-vars and prefer-template eslint rules (#10350)
This commit is contained in:
@@ -64,7 +64,7 @@ export function getDatasourceParameter(datasourceId, datasourceType) {
|
||||
export function getParam(name) {
|
||||
/* eslint no-useless-escape: 0 */
|
||||
const formattedName = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
||||
const regex = new RegExp('[\\?&]' + formattedName + '=([^&#]*)');
|
||||
const regex = new RegExp(`[\\?&]${formattedName}=([^&#]*)`);
|
||||
const results = regex.exec(location.search);
|
||||
return results === null
|
||||
? ''
|
||||
|
||||
Reference in New Issue
Block a user