TypeError can be thrown as "key" might be null or undefined here.SonarQube -
in jquery library jquery-1.4.1-vsdoc.js, following code block :
jquery.fn.extend({ data: function( key, value ) { if ( typeof key === "undefined" && this.length ) { return jquery.data( this[0] ); } else if ( typeof key === "object" ) { return this.each(function() { jquery.data( this, key ); }); } var parts = key.split("."); parts[1] = parts[1] ? "." + parts[1] : ""; thought there no problem @ sonarqube gives me critical error:
typeerror can thrown "key" might null or undefined here.
the word key in key.split(".") highlighted. indicating variable key can undefined/null here.
please suggest how resolve issue. sonarqube build number version 6.3 (build 19869)
Comments
Post a Comment