<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -24,7 +24,6 @@ package fb.util {
   import mx.core.ScrollPolicy;
 
   public class FlexUtil {
-
     public static function getStyle(obj:*, ... styles):* {
       if (!styles || styles.length == 0) return null;
       for (var i:int = 0; i &lt; styles.length-1; i++)
@@ -54,31 +53,36 @@ package fb.util {
 
     // Checks the values of other, and merges them
     //   into orig only if not ==.
-    public static function merge(orig:Object, other:Object):Object {
-      if (!orig || orig.constructor != other.constructor) return other;
+    public static function merge(orig:*, other:*):* {
+      // If either is null, then go w/ the other
+      if (other == null) return orig;
+      if (orig == null) return other;
 
-      if (orig is String ||
+      // If orig is primitive, then check against it
+      if (orig is Number ||
           orig is Boolean ||
-          orig is Number ||
-          orig is uint ||
-          orig is int) {
-        if (orig == other) return orig;
-        else return other;
+          orig is String) {
+        if (orig != other) return other;
+        else return orig;
       }
 
-      if (orig is Object) {
-        var entry:String;
-        for (entry in orig)
-          if (other[entry] &amp;&amp; orig[entry] != other[entry])
-            orig[entry] = other[entry];
-        for (entry in other)
-          if (!orig[entry] || orig[entry] != other[entry])
-            orig[entry] = other[entry];
-        return orig;
-      }
+      // If other is primitive and orig wasn't,
+      //   then go with other.
+      if (other is Number ||
+          other is Boolean ||
+          other is String)
+        return other;
+
+      // If different types, go with other
+      if (orig.constructor != other.constructor) return other;
 
-      Output.assert(&quot;WTF Type is in merge?: &quot; + orig);
-      return null;
+      // Merge the pieces, additively
+      var entry:String;
+      for (entry in orig)
+        orig[entry] = merge(orig[entry], other[entry]);
+      for (entry in other)
+        orig[entry] = merge(orig[entry], other[entry]);
+      return orig;
     }
   }
 }</diff>
      <filename>fb/util/FlexUtil.as</filename>
    </modified>
    <modified>
      <diff>@@ -88,9 +88,7 @@ package fb.util {
       if (item is String)
         return &quot;\&quot;&quot; + item + &quot;\&quot;\n&quot;;
       if (item is Boolean ||
-          item is Number ||
-          item is uint ||
-          item is int)
+          item is Number)
         return String(item) + &quot;\n&quot;;
 
       if (item is Object) {</diff>
      <filename>fb/util/Output.as</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ad7aaf8b3afe597ee205f592f30e7790c8c36050</id>
    </parent>
  </parents>
  <author>
    <name>Justin Bishop</name>
    <email>jubishop@gmail.com</email>
  </author>
  <url>http://github.com/jubishop/Facebook-for-Adobe-AIR/commit/b20eee9d280c439ac9bbe270ba488f7bec2e4b52</url>
  <id>b20eee9d280c439ac9bbe270ba488f7bec2e4b52</id>
  <committed-date>2009-05-14T11:53:07-07:00</committed-date>
  <authored-date>2009-05-14T11:53:07-07:00</authored-date>
  <message>merging recursive fancy.</message>
  <tree>9238a18ae5a61603bd012a0dcf9ea6e4c1fc05a5</tree>
  <committer>
    <name>Justin Bishop</name>
    <email>jubishop@gmail.com</email>
  </committer>
</commit>
