Closed alexfigliolia closed 5 years ago
If the error stops the flow, then you could also just have wrapped the initialization in a try-catch
block. E.g.:
try {
$('.some-element').ripples();
} catch (e) {
// ripples failed to load
}
I think something can be said about not throwing an error, but there has to be an elegant way to figure out whether the plugin initialized or not. This PR does not offer that, so I'll have to reject it.
Also, just a tip for when you contribute to an open source project: don't make built files part of the PR. For this specific repository that would mean the PR should only contain modifications in src/main.js
.
This solves my recently filed issue. Im not sure why, but all of a sudden throwing that error was stopping the flow of my website as opposed to gracefully failing like it used to. Cheers