fix for mobile safari
This commit is contained in:
		
							parent
							
								
									3ee2edc04b
								
							
						
					
					
						commit
						952531809b
					
				@ -131,7 +131,12 @@ exports.base32ToBuffer = function(encoded) {
 | 
			
		||||
            throw new Error('Invalid input - it is not base32 encoded string');
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return decoded.slice(0, plainPos);
 | 
			
		||||
    if (decoded.slice) {
 | 
			
		||||
      return decoded.slice(0, plainPos);
 | 
			
		||||
    } else {
 | 
			
		||||
      // Mobile Safari's Uint8Array doesn't have slice
 | 
			
		||||
      return Array.prototype.slice.call(decoded, 0, plainPos);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
}(window.Unibabel || window));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user