yes yes, I'm gonna simplify and optimize the whole thing. Coming back to
you when it's getting cleaner


2014-02-04 Jed Watson <notifications@github.com>:

> In lib/fieldTypes/fsimage.js:
>
> > +            };
> > +
> > +        },
> > +
> > +        setupVariants: function() {
> > +            var resize = this.variants.resize,
> > +                crop = this.variants.crop ;
> > +            return { "resize" : resize, "crop" : crop }
> > +        },
> > +
> > +        imAction: function(action, file, prefix, size, callback) {
> > +            if (size == "null") {
> > +                return callback(null);
> > +            }
> > +            var dfile = prefix;
> > +            var tfile = this.uploadDir + dfile;
>
> What do dfile and tfile mean? Maybe use longer / more descriptive
> variable names. Also if dfile is only used as an alias to prefix (and
> isn't otherwise modified), just set
>
> var tfile = this.uploadDir + prefix;
>
> Creating a variable only to use it immediately, unless you're simplifying
> a calculation or concatenation, is a bit confusing, looks like there's more
> going on than there is.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/JedWatson/keystone/pull/103/files#r9419720>
> .
>