Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lab. Oceanografia Costeira
Coastal Analyst System from Space Imagery Engine
Commits
9307ea97
Commit
9307ea97
authored
2 months ago
by
hcordeiro
Browse files
Options
Download
Email Patches
Plain Diff
add date validation check before casting to string
parent
babb3362
develop
bug-fix--invalid-coastline-csv-export-dates
dev--refactor-landsat-cloud
optimize--comment-unnecessary-get-infos
No related merge requests found
Pipeline
#14083
passed with stages
in 9 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/components/dialog/CoastlineEvolutionDialog.jsx
+2
-2
src/app/components/dialog/CoastlineEvolutionDialog.jsx
with
2 additions
and
2 deletions
+2
-2
src/app/components/dialog/CoastlineEvolutionDialog.jsx
View file @
9307ea97
...
...
@@ -48,7 +48,7 @@ function showErrorShorelineImages(){
clearInterval
(
intervalCodeShowErrorShorelineImages
);
}
}
function
sortOutput
(
data
){
function
sortOutput
(
data
){
// TODO make nan safe, test corner cases, improve sorting, separate date and distance treatment in functions
data
.
forEach
(
el
=>
{
let
txtDates
=
el
.
dates
;
let
txtDistances
=
el
.
distances
;
...
...
@@ -83,7 +83,7 @@ function sortOutput(data){
}
}
}
while
(
swapped
);
dates
=
dates
.
map
(
el
=>
el
.
toISOString
());
dates
=
dates
.
map
(
el
=>
isFinite
(
el
)
?
el
.
toISOString
()
:
""
);
distancesTxtArray
=
distancesTxtArray
.
map
(
el
=>
Number
.
parseFloat
(
el
).
toFixed
(
2
));
el
.
dates
=
'
"
'
+
JSON
.
stringify
(
dates
).
replace
(
/"/g
,
"
'
"
).
replace
(
/.000Z/g
,
""
)
+
'
"
'
;
el
.
distances
=
'
"
'
+
JSON
.
stringify
(
distancesTxtArray
).
replace
(
/"/g
,
"
'
"
).
replace
(
/'/g
,
""
)
+
'
"
'
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help