mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-26 10:00:50 +08:00
fix(*): spec failures related to moment-round again
This commit is contained in:
parent
aab39a12da
commit
3bfad0c9e1
4 changed files with 11 additions and 2 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 688d83807a961ba5e8e79050ec2d54ba7a49a643
|
||||
Subproject commit ae4de39d22e1f0c85641a988dc21ec44846884ef
|
|
@ -113,6 +113,9 @@ window.TEST_ACCOUNT_ALIAS_EMAIL = "tester+alternative@nylas.com"
|
|||
|
||||
window.TEST_TIME_ZONE = "America/Los_Angeles"
|
||||
moment = require('moment-timezone')
|
||||
# moment-round upon require patches `moment` with new functions.
|
||||
require('moment-round')
|
||||
|
||||
# This date was chosen because it's close to a DST boundary
|
||||
window.testNowMoment = ->
|
||||
moment.tz("2016-03-15 12:00", TEST_TIME_ZONE)
|
||||
|
|
|
@ -121,3 +121,6 @@ export default class NylasCalendar extends React.Component {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NylasCalendar.WeekView = WeekView;
|
||||
|
|
|
@ -145,7 +145,10 @@ class WindowEventHandler
|
|||
|
||||
openLink: ({href, target, currentTarget, metaKey}) ->
|
||||
if not href
|
||||
href = target?.getAttribute('href') or currentTarget?.getAttribute('href')
|
||||
if target instanceof Element
|
||||
href = target.getAttribute('href')
|
||||
else if currentTarget instanceof Element
|
||||
href = currentTarget.getAttribute('href')
|
||||
|
||||
return unless href
|
||||
|
||||
|
|
Loading…
Reference in a new issue