aboutsummaryrefslogtreecommitdiff
path: root/events/event.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'events/event.cpp')
-rw-r--r--events/event.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/events/event.cpp b/events/event.cpp
index 0132fdc6..8a6de822 100644
--- a/events/event.cpp
+++ b/events/event.cpp
@@ -50,14 +50,14 @@ QByteArray Event::originalJson() const
QDateTime Event::toTimestamp(const QJsonValue& v)
{
- Q_ASSERT(v.isDouble() || v.isNull());
+ Q_ASSERT(v.isDouble() || v.isNull() || v.isUndefined());
return QDateTime::fromMSecsSinceEpoch(
static_cast<long long int>(v.toDouble()), Qt::UTC);
}
QStringList Event::toStringList(const QJsonValue& v)
{
- Q_ASSERT(v.isArray() || v.isNull());
+ Q_ASSERT(v.isArray() || v.isNull() || v.isUndefined());
QStringList l;
for( const QJsonValue& e : v.toArray() )