"use-strict" mode leads to initialization Error in all versions of plugin

  • Hello there,

    I've come across with initialization Krpano Viewer Error while setting "use-scrict" mode in Javascript. I can't just switch it off because too much functionality depends upon this mode in other modules.

    To represent this Error I've built a codepen example (https://codepen.io/anon/pen/LmBPvm )-> open developer console to see the Error message.

    According my observations it happens due to setting Uint8Array.length = 0, when in 'strict mode' assignment to read-only properties is not allowed

    Please help me to solve this problem.

  • Klaus,

    Thank you for your suggestion, but unfortunately it doesn't solve my problem.
    Did you have a chance to check out the link that I've attached to the post?
    The problem still exists whenever I put 'use-strict' mode, and it's only disappears when I remove 'use-strict' definition from JS file.

    Could you please, check out error example link and suggest another solution?

  • Hi,

    Let me explain the situation itself. We make an SPA where a couple of pages depends on krpano plugin, so we use Webpack to manage JS bundle.

    If I decide to switch off --use-strict mode for all imported dependencies at may leed to future errors. So, I hope that this behaviour will be fixed in future releases.

    We use krpano files itself to give users ability to manage hotspots that they have built in Panotour (icons, position etc)


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!