Skip to content

Commit 70137a8

Browse files
authored
Merge pull request #6701 from Countly/pop-nps-24.05
[populator] Fix nps generator
2 parents 29317e5 + f282ef6 commit 70137a8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Version 24.05.X
2+
Fixes:
3+
- [populator] Fix nps generator
4+
5+
16
## Version 24.05.39
27
Features:
38
- [remote-config] Enable comparing newer/older app version in conditions

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)