Skip to content

Commit afe7e3e

Browse files
committed
[populator] Fix nps generator
1 parent 29317e5 commit afe7e3e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugins/populator/frontend/public/javascripts/countly.models.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,8 +1634,13 @@
16341634
},
16351635
success: function(json, textStatus, xhr) {
16361636
if (json && json.result) {
1637-
var id = json.result.split(" ");
1638-
npsWidgetList.push(id[2]);
1637+
if (json.result._id) {
1638+
npsWidgetList.push(json.result._id);
1639+
}
1640+
else if (json.result.text) {
1641+
var id = json.result.text.split(" ");
1642+
npsWidgetList.push(id[2]);
1643+
}
16391644
}
16401645
callback(json, textStatus, xhr);
16411646
},

0 commit comments

Comments
 (0)