mvvm stopped working with null in later versions

1 Answer 19 Views
MVVM
Shashwat
Top achievements
Rank 1
Shashwat asked on 29 Apr 2024, 10:14 AM

Hi Team,

Please see below dojo.

MVVM changes since 2023 have broken our app in a lot of places, but we're left with very little docs about which parts are impacted.

Values init with 'null' stopped working since upgrade to 2023 (csp changes again?). Same changes work if the values are init with 'undefined' instead. Please check if we're doing something incorrectly.

https://dojo.telerik.com/umOmiMiN/2

Thanks

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 02 May 2024, 08:08 AM

Hello, Shashwat,

Thank you for reaching out to us. There is an existing bug report about it in our Feedback Portal where you can track its status. I will raise the bug's priority a bit so that it will move up in our bug fixing queue.

Let me know if you have any questions.

Regards,
Martin
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Shashwat
Top achievements
Rank 1
commented on 02 May 2024, 08:17 AM

Hi Martin,

So my issue isn't related to MVVM, but dropdownlist component? Does this happen when using it without mvvm?

Thanks,
Shashwat

Peter Milchev
Telerik team
commented on 06 May 2024, 10:06 AM

Hi Shashwat, 

The error is thrown in the MVVM logic, when trying to access a property to a null object, so the DropDownList should not be affected.

In the reported example below, when the MVVM logic tries to access .data property, it is doing the equivalent to calling "null.data" which throws an error:

<input data-role="dropdownlist"
         data-bind="source: property.data"
    > 

Shashwat
Top achievements
Rank 1
commented on 06 May 2024, 12:16 PM

Hi Peter,

Noted. Also note that

  • changing `property: undefined` works (no error in console) and
  • changing `property: null` used to work before 2023 releases

My question: this behavior change broke our application subtly in different places. Is there migration/upgrade steps to make the upgrade process a little smoother. 

Peter Milchev
Telerik team
commented on 09 May 2024, 08:08 AM

Hi, I am afraid no such migration guides are available as once the reported bug is fixed, this setup should no longer be an issue.
Tags
MVVM
Asked by
Shashwat
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or