bitovi/funcunit

invalid usage of delete operator

开放

#246 创建于 2019年5月29日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (395 个派生)batch import
bughelp wantedp2

仓库指标

星标
 (575 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南