Skip to content

Commit e9a5b5a

Browse files
fixed #5
1 parent 8ca4213 commit e9a5b5a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/jquery-bar-rating.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ function init(Survey) {
33
name: "barrating",
44
title: "Bar rating",
55
iconName: "icon-barrating",
6-
widgetIsLoaded: function() { return !!$.fn.barrating; },
6+
widgetIsLoaded: function() { return typeof $ === 'function' && !!$.fn.barrating; },
77
defaultJSON: {choices: [1, 2, 3, 4, 5]},
8-
isFit : function(question) { return typeof $ == 'function' && !!$.fn.barrating; },
8+
isFit : function(question) {
9+
return question.getType() === 'barrating';
10+
},
911
isDefaultRender: true,
1012
activatedByChanged: function(activatedBy) {
1113
Survey.JsonObject.metaData.addClass("barrating", [ {name: "showValues:boolean", default: false},

0 commit comments

Comments
 (0)