mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
JS: Some fixes and address review comments
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import dateFns from 'date-fns';
|
||||
import dateFnsFp from 'date-fns/fp';
|
||||
import dateFnsUtc from 'date-fns/utc';
|
||||
import dateFnsEsm from 'date-fns/esm';
|
||||
import moment from 'moment';
|
||||
|
||||
function main() {
|
||||
@@ -8,7 +8,7 @@ function main() {
|
||||
let taint = decodeURIComponent(window.location.hash.substring(1));
|
||||
|
||||
document.body.innerHTML = `Time is ${dateFns.format(time, taint)}`; // NOT OK
|
||||
document.body.innerHTML = `Time is ${dateFnsUtc.format(time, taint)}`; // NOT OK
|
||||
document.body.innerHTML = `Time is ${dateFnsEsm.format(time, taint)}`; // NOT OK
|
||||
document.body.innerHTML = `Time is ${dateFnsFp.format(taint)(time)}`; // NOT OK
|
||||
document.body.innerHTML = `Time is ${dateFns.format(taint, time)}`; // OK - time arg is safe
|
||||
document.body.innerHTML = `Time is ${dateFnsFp.format(time)(taint)}`; // OK - time arg is safe
|
||||
|
||||
Reference in New Issue
Block a user