Protect JS from error in Sharrre functionality