Trying to filter this error ReferenceError: window is not defined
https://runkit.com/npm/kute.js
This commit is contained in:
parent
ff5d6d139b
commit
b267bd0422
2
demo/src/kute.min.js
vendored
2
demo/src/kute.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/kute.min.js
vendored
2
dist/kute.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -10,7 +10,7 @@
|
|||
var KUTE = require("./kute.js");
|
||||
// Export the modified one. Not really required, but convenient.
|
||||
module.exports = factory(KUTE);
|
||||
} else if(typeof window.KUTE != "undefined") {
|
||||
} else if (typeof window.KUTE !== "undefined") {
|
||||
factory(KUTE);
|
||||
} else {
|
||||
throw new Error("CSS Plugin require KUTE.js.")
|
||||
|
|
6
kute.js
6
kute.js
|
@ -7,7 +7,7 @@
|
|||
define([], factory); // AMD. Register as an anonymous module.
|
||||
} else if (typeof exports == 'object') {
|
||||
module.exports = factory(); // Node, not strict CommonJS
|
||||
} else {
|
||||
} else if (typeof window !== 'undefined') {
|
||||
// Browser globals
|
||||
window.KUTE = factory();
|
||||
}
|
||||
|
@ -143,7 +143,7 @@
|
|||
_pfto = property('transformOrigin'), //assign preffix to DOM properties
|
||||
_pfp = property('perspective'),
|
||||
_pfo = property('perspectiveOrigin'),
|
||||
_tr = g.pfTransform = property('transform'),
|
||||
_tr = g.transformProperty = property('transform'),
|
||||
_raf = g.requestAnimationFrame || g.webkitRequestAnimationFrame || function (c) { return setTimeout(c, 16) },
|
||||
_caf = g.cancelAnimationFrame || g.webkitCancelRequestAnimationFrame || function (c) { return clearTimeout(c) },
|
||||
|
||||
|
@ -534,7 +534,7 @@
|
|||
return this;
|
||||
},
|
||||
// single Tween object construct
|
||||
Tween = function (_el, _vS, _vE, _o) {
|
||||
Tween = g.Tween = function (_el, _vS, _vE, _o) {
|
||||
this._el = _el; // element animation is applied to
|
||||
this._vSR = {}; // internal valuesStartRepeat
|
||||
this._vS = _vS; // valuesStart
|
||||
|
|
Loading…
Reference in a new issue