Skip to content

Commit 6c9678d

Browse files
#92 deal with null params
1 parent 5a68776 commit 6c9678d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns="http://apache.org/cordova/ns/plugins/1.0"
44
xmlns:android="http://schemas.android.com/apk/res/android"
55
id="nl.x-services.plugins.calendar"
6-
version="4.2.5">
6+
version="4.2.6">
77

88
<name>Calendar</name>
99

src/android/nl/xservices/plugins/Calendar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ private boolean findEvents(JSONArray args) {
163163
try {
164164
JSONObject jsonFilter = args.getJSONObject(0);
165165
JSONArray jsonEvents = getCalendarAccessor().findEvents(
166-
jsonFilter.optString("title"),
167-
jsonFilter.optString("location"),
166+
jsonFilter.isNull("title") ? null : jsonFilter.optString("title"),
167+
jsonFilter.isNull("location") ? null : jsonFilter.optString("location"),
168168
jsonFilter.optLong("startTime"),
169169
jsonFilter.optLong("endTime"));
170170

0 commit comments

Comments
 (0)