add typeof check to checkDeprecatedMixinEvents

!L may result in a undefined error when running tests that also touch including a leaflet plugin.
This commit is contained in:
Maarten Brouwers 2017-11-09 10:10:41 +01:00 committed by GitHub
parent 8e32e31ef8
commit 52bd90c27c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,7 @@ Class.addInitHook = function (fn) { // (Function) || (String, args...)
};
function checkDeprecatedMixinEvents(includes) {
if (!L || !L.Mixin) { return; }
if (typeof L === 'undefined' || !L || !L.Mixin) { return; }
includes = Util.isArray(includes) ? includes : [includes];