zammad/zammad

View on GitHub
app/assets/javascripts/knowledge_base_public_polyfills/svgstore.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function svg4everybody has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function svg4everybody(rawopts) {
      function oninterval() {
          // while the index exists in the live <use> collection
          for (// get the cached <use> index
          var index = 0; index < uses.length; ) {
Severity: Minor
Found in app/assets/javascripts/knowledge_base_public_polyfills/svgstore.js - About 1 hr to fix

    Function oninterval has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function oninterval() {
              // while the index exists in the live <use> collection
              for (// get the cached <use> index
              var index = 0; index < uses.length; ) {
                  // get the current <use>
    Severity: Minor
    Found in app/assets/javascripts/knowledge_base_public_polyfills/svgstore.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                                if (url.length) {
                                    // get the cached xhr request
                                    var xhr = requests[url];
                                    // ensure the xhr request exists
                                    xhr || (xhr = requests[url] = new XMLHttpRequest(), xhr.open("GET", url), xhr.send(), 
      Severity: Major
      Found in app/assets/javascripts/knowledge_base_public_polyfills/svgstore.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status