We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b1ad706 + 90fd60a commit f3ed352Copy full SHA for f3ed352
api/lib/countly.common.js
@@ -786,10 +786,16 @@ countlyCommon.isValidPeriodParam = function(period) {
786
}
787
788
if (typeof period === 'object') {
789
- return Object.prototype.hasOwnProperty.call(period, 'since') || Object.prototype.hasOwnProperty.call(period, 'period');
+ if (Object.prototype.hasOwnProperty.call(period, 'period')) {
790
+ return countlyCommon.isValidPeriodParam(period.period);
791
+ }
792
+ else {
793
+ return Object.prototype.hasOwnProperty.call(period, 'since');
794
795
796
797
return period === 'month' ||
798
+ period === 'prevMonth' ||
799
period === 'day' ||
800
period === 'yesterday' ||
801
period === 'hour' ||
0 commit comments