mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-30 16:01:14 -04:00
fix(curriculum): add optional chaining (#59534)
This commit is contained in:
@@ -23,7 +23,7 @@ function rgbToHex(rgb) {
|
||||
return (
|
||||
"#" +
|
||||
rgbValues
|
||||
.map((num) => parseInt(num).toString(16).padStart(2, "0"))
|
||||
?.map((num) => parseInt(num).toString(16).padStart(2, "0"))
|
||||
.join("")
|
||||
);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ function rgbToHex(rgb) {
|
||||
return (
|
||||
"#" +
|
||||
rgbValues
|
||||
.map((num) => parseInt(num).toString(16).padStart(2, "0"))
|
||||
?.map((num) => parseInt(num).toString(16).padStart(2, "0"))
|
||||
.join("")
|
||||
);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ function rgbToHex(rgb) {
|
||||
return (
|
||||
"#" +
|
||||
rgbValues
|
||||
.map((num) => parseInt(num).toString(16).padStart(2, "0"))
|
||||
?.map((num) => parseInt(num).toString(16).padStart(2, "0"))
|
||||
.join("")
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user