Skip to content

Commit

Permalink
Supported the model parameter in KO bingding in favour of consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 committed Dec 8, 2023
1 parent 891f190 commit b318b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/knockout/kosurvey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ItemValue.prototype["onCreating"] = function () {
ko.components.register("survey", {
viewModel: {
createViewModel: function (params: any, componentInfo: any) {
var survey: Survey = ko.unwrap(params.survey);
var survey: Survey = ko.unwrap(params.survey) || ko.unwrap(params.model);
ensureSurvey(survey);
setTimeout(() => {
var surveyRoot = document.createElement("div");
Expand Down

0 comments on commit b318b14

Please sign in to comment.