Skip to content

Commit 2d66a98

Browse files
committed
[populator] Fix nps generator
1 parent 479f2d6 commit 2d66a98

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
@@ -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)