Comparing version 1.1.0 to 1.2.0
@@ -200,3 +200,5 @@ (function() { | ||
if (!header.isDef) { | ||
return this.amf3StringReferences[header.value]; | ||
return this.amf3StringReferences[header.value] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
@@ -215,3 +217,5 @@ if (header.value === 0) { | ||
if (!header.isDef) { | ||
return this.amf3ObjectReferences[header.value]; | ||
return this.amf3ObjectReferences[header.value] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
@@ -227,3 +231,5 @@ date = new Date(this.readDoubleBE()); | ||
if (!header.isDef) { | ||
return this.amf3ObjectReferences[header.value]; | ||
return this.amf3ObjectReferences[header.value] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
@@ -250,4 +256,6 @@ named = {}; | ||
var isDynamic, isExternalizable, j, name, ref, staticKeyLen, trait, x; | ||
if (flags & 1 === 0) { | ||
return this.amf3TraitReferences[flags >> 1]; | ||
if ((flags & 1) === 0) { | ||
return this.amf3TraitReferences[flags >> 1] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
@@ -272,6 +280,11 @@ name = this.deserialize(AMF3.STRING, AMF3); | ||
if (!header.isDef) { | ||
return this.amf3ObjectReferences[header.value]; | ||
return this.amf3ObjectReferences[header.value] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
trait = readAMF3ObjectHeader.call(this, header.value); | ||
if (trait.externalizable) { | ||
if (trait.name === "flex.messaging.io.ArrayCollection") { | ||
return this.decode(AMF3); | ||
} | ||
if (!AMFDecoder.amf3Externalizables[trait.name]) { | ||
@@ -300,3 +313,5 @@ throw new Error("No externalizable registered with name " + trait.name); | ||
if (!header.isDef) { | ||
return this.amf3ObjectReferences[header.value]; | ||
return this.amf3ObjectReferences[header.value] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
@@ -312,3 +327,5 @@ bytes = this.readByte(header.value); | ||
if (!header.isDef) { | ||
return this.amf3ObjectReferences[header.value]; | ||
return this.amf3ObjectReferences[header.value] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
@@ -356,3 +373,5 @@ this.readByte(); | ||
if (!header.isDef) { | ||
return this.amf3ObjectReferences[header.value]; | ||
return this.amf3ObjectReferences[header.value] || (function() { | ||
throw new Error("Invalid reference"); | ||
})(); | ||
} | ||
@@ -359,0 +378,0 @@ this.readByte(); |
{ | ||
"name": "amfjs", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A simple AMF (ActionScript Message Format) library for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/amf-js.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74606
1124