do not support destructuring arguments and ngInject
This commit is contained in:
committed by
Richard van Velzen
parent
f7460166dd
commit
4644becb9b
@@ -230,9 +230,16 @@ merge(Compressor.prototype, {
|
||||
return /@ngInject/.test(comment.value);
|
||||
}
|
||||
function make_arguments_names_list(func) {
|
||||
var foundDestructuring = false;
|
||||
return func.argnames.map(function(sym){
|
||||
// TODO not sure what to do here with destructuring
|
||||
if (sym instanceof AST_Destructuring) {
|
||||
compressor.warn("Function with destructuring arguments marked with @ngInject [{file}:{line},{col}]", token);
|
||||
foundDestructuring = true;
|
||||
}
|
||||
if (foundDestructuring) { return null; }
|
||||
return make_node(AST_String, sym, { value: sym.name });
|
||||
}).filter(function (name) {
|
||||
return name !== null;
|
||||
});
|
||||
}
|
||||
function make_array(orig, elements) {
|
||||
|
||||
Reference in New Issue
Block a user