bitovi/funcunit

invalid usage of delete operator

Open

#246 geöffnet am 29. Mai 2019

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (395 Forks)batch import
bughelp wantedp2

Repository-Metriken

Stars
 (575 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

There is usage of the delete operator in the method add (browser/queue.js). This construction is not valid in the strict mode so it leads to fail when FuncUnit is imported as a ES6 module.

add = function(handler, error, context) {
  if(handler instanceof Function) {
    if(typeof error === 'object') {
      context = error;
      delete error;
    }

    error = (error && error.toString()) || 'Custom method has failed.';

Found in the npm version 3.7.0

Contributor Guide