fix(*): spec failures related to moment-round again

This commit is contained in:
Ben Gotow 2016-04-24 15:21:29 -05:00
parent aab39a12da
commit 3bfad0c9e1
4 changed files with 11 additions and 2 deletions

@ -1 +1 @@
Subproject commit 688d83807a961ba5e8e79050ec2d54ba7a49a643
Subproject commit ae4de39d22e1f0c85641a988dc21ec44846884ef

View file

@ -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)

View file

@ -121,3 +121,6 @@ export default class NylasCalendar extends React.Component {
)
}
}
NylasCalendar.WeekView = WeekView;

View file

@ -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