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

This commit is contained in:
Hyunje Alex Jun 2015-07-14 12:22:40 +09:00
parent f9f20eeb6f
commit 6c642d8a47
2 changed files with 2 additions and 2 deletions

View File

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

View File

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