kendo.getter cache doesn't return safe version

3 posts, 1 answers
  1. Euan
    Euan avatar
    15 posts
    Member since:
    Jan 2013

    Posted 28 Aug 2014 Link to this post

    Hi,

    I have an issue where the non-safe getter is being cached and then when I need the safe version the cache returns the non-safe.
    i.e.
    First call results in:
    return d.c1661059794
    second call that needs the safe version gets the above instead of:
    return ((d.c1661059794 || {}).value)

    This is entirely in kendo code and appears to be caused by having both a grid with (aggregates) and chart on the same page. Both use separate datasources, but contain similar data where the value is a complex object.

    The first call to the getter appears to be from the grid datasource running the aggregation (stack trace attached).

    Firstly, should the cache not take the safe flag into account? I would consider it a bug that it doesn't.
    Secondly, is there a workaround I can use to fix the cache so that the safe version is returned?
    I am currently using Kendo UI v2014.1.528 though could update to the latest if it would resolve.

    Thanks
    Euan
  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 29 Aug 2014 Link to this post

    Hello Euan,

    Thank you for reporting this. It has been fixed in Kendo UI Core, and will be available in the next internal build. You can either patch the method in your project or use the build -- the latter is the cleaner approach.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Euan
    Euan avatar
    15 posts
    Member since:
    Jan 2013

    Posted 29 Aug 2014 in reply to Alex Gyoshev Link to this post

    Thanks for the quick turnaround.

    Euan
Back to Top