Skip to content

Commit a0a3fc0

Browse files
authored
Merge pull request #6700 from Countly/pop-nps
[populator] Fix nps generator
2 parents 479f2d6 + e642866 commit a0a3fc0

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 25.03.X
2+
Fixes:
3+
- [populator] Fix nps generator
4+
5+
16
## Version 25.03.20
27
Fixes:
38
- [push] Fix: Migrate push to the new events model

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,8 +1815,13 @@
18151815
},
18161816
success: function(json, textStatus, xhr) {
18171817
if (json && json.result) {
1818-
var id = json.result.split(" ");
1819-
npsWidgetList.push(id[2]);
1818+
if (json.result._id) {
1819+
npsWidgetList.push(json.result._id);
1820+
}
1821+
else if (json.result.text) {
1822+
var id = json.result.text.split(" ");
1823+
npsWidgetList.push(id[2]);
1824+
}
18201825
}
18211826
callback(json, textStatus, xhr);
18221827
},

0 commit comments

Comments
 (0)