mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix comparison of Buffers (again)
This commit is contained in:
		@@ -92,9 +92,9 @@ function compareObjects(obj1,obj2) {
 | 
				
			|||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (isBuffer1 && isBuffer2) {
 | 
					    if (isBuffer1 && isBuffer2) {
 | 
				
			||||||
        if (Buffer.compare) {
 | 
					        if (obj1.equals) {
 | 
				
			||||||
            // For node 4.x+ - use the native compare
 | 
					            // For node 0.12+ - use the native equals
 | 
				
			||||||
            return Buffer.equals(obj1,obj2);
 | 
					            return obj1.equals(obj2);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            if (obj1.length !== obj2.length) {
 | 
					            if (obj1.length !== obj2.length) {
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user