Just early return instead of throwing an error for no instance.

master
Hyunje Alex Jun 9 years ago
parent f9f20eeb6f
commit 6c642d8a47

@ -11,7 +11,7 @@ module.exports = function (element) {
var i = instances.get(element);
if (!i) {
throw new Error('perfect-scrollbar: instance not found');
return;
}
i.event.unbindAll();

@ -12,7 +12,7 @@ module.exports = function (element) {
var i = instances.get(element);
if (!i) {
throw new Error('perfect-scrollbar: instance not found');
return;
}
// Recalcuate negative scrollLeft adjustment

Loading…
Cancel
Save