Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tools
mattermost
mattermost-plugin-walltime
Commits
e92f9946
Commit
e92f9946
authored
Oct 14, 2021
by
James Addison
Browse files
Avoid access to private object properties
parent
4289cded
Pipeline
#31762
passed with stages
in 20 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
webapp/src/time.js
View file @
e92f9946
...
...
@@ -37,8 +37,7 @@ export function convertTimesToLocal(message, messageCreationTime, localTimezone,
delete
parsedTime
.
start
.
knownValues
.
timezoneOffset
;
}
const
anchorTimezoneStart
=
parsedTime
.
start
.
knownValues
.
timezoneOffset
;
if
(
typeof
anchorTimezoneStart
===
'
undefined
'
)
{
if
(
!
parsedTime
.
start
.
isCertain
(
'
timezoneOffset
'
))
{
return
message
;
}
...
...
@@ -48,7 +47,7 @@ export function convertTimesToLocal(message, messageCreationTime, localTimezone,
const
currentUserStartDate
=
moment
(
parsedTime
.
start
.
date
()).
tz
(
localTimezone
).
locale
(
locale
);
if
(
!
currentUserStartDate
.
isSame
(
moment
(),
'
year
'
))
{
renderingFormat
=
DATE_FORMAT
;
}
else
if
(
typeof
parsedTime
.
start
.
knownValues
.
day
===
'
undefined
'
&&
typeof
parsedTime
.
start
.
knownValues
.
weekday
===
'
undefined
'
)
{
}
else
if
(
!
parsedTime
.
start
.
isCertain
(
'
day
'
)
&&
!
parsedTime
.
start
.
isCertain
(
'
weekday
'
)
)
{
renderingFormat
=
TIME_FORMAT
;
}
if
(
parsedTime
.
end
)
{
...
...
Write
Preview
Supports
Markdown
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