Closed TWithers closed 1 year ago
@TWithers Awesome! I'm going to see if we need to test https://github.com/bootboxjs/bootbox/pull/836/files#diff-f575c474c7914f9ce9400a33114971ebd4b992348260a17a7ee8be2ba361e700R869 for null, first - I think if options.message
is null then options.message.trim()
will cause an error. Everything else looks good, and Karma seems happy.
@TWithers Needed to make a few tweaks - we have some linting rules that need to be followed, and we need a "null" check on options.message
with this update. I made both changes.
For future reference, we do have a test suite that needs to be run and pass for pull-requests to be merged. This and the linter will be run when you run grunt
in the terminal.
Using jQuery Migrate on a project and noticed several deprecations that were being reported from the bootbox library.
$.isArray()
was deprecated in jQuery 3.2$.isFunction()
was deprecated in jQuery 3.3$.type()
was deprecated in jQuery 3.3$.trim()
was deprecated in jQuery 3.5I went in and fixed all the deprecations listed above, with the substitutions below.
$.isFunction(x)
becametypeof x === "function"
!$.isFunction(x)
becametypeof x !== "function"
$.isArray(x)
becameArray.isArray(x)
$.type(x)
becametypeof x
$.trim(x)
becamex.trim()