Skip to content

Commit

Permalink
Use Object getter memoization for command getter
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalduez committed Feb 15, 2015
1 parent 8d8aa3e commit 7241be3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class Converter {
*
* @return {Object}
*/
command() {
memo command() {
let cmd = `${this.bundler ? 'bundle exec ' : ''}sass-convert`;

// Add required args.
Expand Down Expand Up @@ -207,7 +207,7 @@ class Converter {
* @return {Promise}
*/
convertFile(file, enc) {
let { cmd, args } = this.cmdCache ?= this.command();
let { cmd, args } = this.command;
let child = spawn(cmd, args);
let result = {};

Expand Down

0 comments on commit 7241be3

Please sign in to comment.