Just early return instead of throwing an error for no instance.
This commit is contained in:
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…
Reference in New Issue
Block a user