cp-multi-selector
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -6,3 +6,3 @@ /*! | ||
* license: MIT | ||
* version: 2.0.1 | ||
* version: 2.0.2 | ||
*/ | ||
@@ -255,3 +255,3 @@ exports['cp-multi-selector'] = function (modules) { | ||
if (!$(e.target).closest(el).length) { | ||
scope.$apply(function () { | ||
safeApply(scope, function () { | ||
scope.showDialog = false; | ||
@@ -267,7 +267,5 @@ }); | ||
function triggerChange() { | ||
$timeout(function () { | ||
scope.$apply(function () { | ||
scope.onChange(); | ||
}); | ||
}, null, false); | ||
safeApply(scope, function () { | ||
scope.onChange(); | ||
}); | ||
} | ||
@@ -304,3 +302,11 @@ } | ||
} | ||
]); /***/ | ||
]); | ||
function safeApply(scope, fn) { | ||
var phase = scope.$root.$$phase; | ||
if (phase === '$apply' || phase === '$digest') { | ||
fn(); | ||
} else { | ||
scope.$apply(fn); | ||
} | ||
} /***/ | ||
}, | ||
@@ -307,0 +313,0 @@ function (module, exports) { |
{ | ||
"name": "cp-multi-selector", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Component Description", | ||
@@ -5,0 +5,0 @@ "main": "build/cp-multi-selector.js", |
@@ -199,3 +199,3 @@ var _ = require('lodash'); | ||
if(!$(e.target).closest(el).length) { | ||
scope.$apply(function() { | ||
safeApply(scope, function() { | ||
scope.showDialog = false; | ||
@@ -213,7 +213,5 @@ }) | ||
function triggerChange() { | ||
$timeout(function() { | ||
scope.$apply(function() { | ||
scope.onChange(); | ||
}); | ||
}, null, false); | ||
safeApply(scope, function() { | ||
scope.onChange(); | ||
}); | ||
} | ||
@@ -253,1 +251,11 @@ } | ||
}]); | ||
function safeApply(scope, fn) { | ||
var phase = scope.$root.$$phase; | ||
if (phase === '$apply' || phase === '$digest') { | ||
fn(); | ||
} else { | ||
scope.$apply(fn); | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1188
0
58455
16