bitovi/funcunit

invalid usage of delete operator

Open

#246 ouverte le 29 mai 2019

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)JavaScript (395 forks)batch import
bughelp wantedp2

Métriques du dépôt

Stars
 (575 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur