The reason I added this is because I got the error "trigger is not a function" over and over again, and it rendered the plugin useless. By adding these if-statements this error is circumvented, without removing the functionality that you originally intended here.
The reason I added this is because I got the error "trigger is not a function" over and over again, and it rendered the plugin useless. By adding these if-statements this error is circumvented, without removing the functionality that you originally intended here.