sealcode / sealious

An extensible, declarative node framework
25 stars 2 forks source link

Pointless if in `access-strategy-types/not.js` #276

Closed adwydman closed 8 years ago

adwydman commented 8 years ago

Here's a part of the checker function for not.js:

checker_function: function(context, params, item){
        var strategies;
        if (strategies instanceof Array){
            strategies = params.map((declaration) => new Sealious.AccessStrategy(declaration));
        } else {
            strategies = [new Sealious.AccessStrategy(params)];
        }

This conditionals don't make much sense, because strategies will never be an instance of Array object. Please see into it.

kuba-orlik commented 8 years ago

Oh, you're right, it's pointless - must've kept it there by an accident.

adwydman commented 8 years ago

If you find time please fix this and close the issue. :) (I closed it by accident...)