I'm using this module inside requirejs and I don't know what I changed and now I get this error:
datepickk.js:1146 Uncaught TypeError: Cannot freeze
at Function.freeze (<anonymous>)
at Datepickk (datepickk.js:1146)
at Object.execCb (require.js:1693)
at Module.check (require.js:881)
at Module.enable (require.js:1173)
at Module.init (require.js:786)
at callGetModule (require.js:1200)
at Object.completeLoad (require.js:1587)
at HTMLScriptElement.onScriptLoad (require.js:1714)
If I just return that; the script works as it should inside requirejs.
What drives me crazy is It used to work before and I didn't change anything on my code!
This is how I call it:
# main.js
require.config({
paths: {
'Datepickk': '../../build/bower_components/datepickk/dist/datepickk'
}
});
# home.js
define(['jquery', 'Chart', 'Datepickk'], function ($, Chart, datepicker) {
var Widget = function () {
};
Widget.prototype = {
init: function (scope) {
"use strict";
var widget = this;
console.log(datepicker);
...
I'm using this module inside requirejs and I don't know what I changed and now I get this error:
If I just
return that;the script works as it should inside requirejs.What drives me crazy is It used to work before and I didn't change anything on my code!
This is how I call it: