[epiphany/pgriffis/web-extension-alarms] WebExtensions: Set Alarm.periodInMinutes to null when unset



commit cd9fa72a11b1472426e7dd9557d60e1c677c3d1a
Author: Patrick Griffis <pgriffis igalia com>
Date:   Sat May 28 13:48:28 2022 -0500

    WebExtensions: Set Alarm.periodInMinutes to null when unset
    
    This matches Firefox

 src/webextension/api/alarms.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/webextension/api/alarms.c b/src/webextension/api/alarms.c
index 41b3f53fa..a0f6e54f7 100644
--- a/src/webextension/api/alarms.c
+++ b/src/webextension/api/alarms.c
@@ -107,6 +107,8 @@ alarm_to_node (Alarm *alarm)
   json_object_set_double_member (obj, "scheduledTime", alarm->scheduled_time);
   if (alarm->repeat_interval_ms)
     json_object_set_double_member (obj, "periodInMinutes", alarm->repeat_interval_minutes);
+  else
+    json_object_set_null_member (obj, "periodInMinutes");
 
   return node;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]