forked from coolaj86/goldilocks.js
		
	fixed a few minor issues
This commit is contained in:
		
							parent
							
								
									85a0c3d421
								
							
						
					
					
						commit
						e52ae83aa4
					
				@ -59,14 +59,14 @@ module.exports.create = function () {
 | 
			
		||||
        if (err) {
 | 
			
		||||
          reject(err);
 | 
			
		||||
        } else {
 | 
			
		||||
          resolve();
 | 
			
		||||
          resolve(curState());
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return {
 | 
			
		||||
    isRunning: curState
 | 
			
		||||
    curState: curState
 | 
			
		||||
  , start: start
 | 
			
		||||
  , stop: stop
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@ module.exports.create = function (deps, conf) {
 | 
			
		||||
  function read(fileName) {
 | 
			
		||||
    return fs.readFileAsync(path.join(storageDir, fileName))
 | 
			
		||||
    .then(JSON.parse, function (err) {
 | 
			
		||||
      if (err.code === 'ENOEXIST') {
 | 
			
		||||
      if (err.code === 'ENOENT') {
 | 
			
		||||
        return {};
 | 
			
		||||
      }
 | 
			
		||||
      throw err;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user