Some code only works while chrome debugger is active
问题 I'm working on a react-native application and I'm trying to format a date using moment. Dates look like "02-16-2016 09:04:23" function formatTime(date){ var formattedDate = moment(date).format('MM:ss A'); return formattedDate; } Works fine if the chrome debugger is active. But if I disable it, all I get is "invalid date" Same thing with a decoding function I'm using var that = this; MessagesService.getMessageBody(selectedMessage) .then(function(messageBody){ var decodedData = window.atob