Use .push to extend array instead of spread operator

This commit is contained in:
harryadel
2023-06-23 16:51:45 +03:00
parent 76f41d969c
commit 55ddefb4f3

View File

@@ -95,7 +95,7 @@ var prepareForCspDirective = function (directive) {
cspSrcs = cspSrcs || {};
cachedCsp = null;
if (!has(cspSrcs, directive))
cspSrcs[directive] = [...cspSrcs["default-src"]];
cspSrcs[directive] = [].push(cspSrcs["default-src"]);
};
// Add `src` to the list of allowed sources for `directive`, with the