Index: diff.module
===================================================================
--- diff.module	(revision 430)
+++ diff.module	(working copy)
@@ -415,13 +415,16 @@
  * Used to add a 'Preview changes' button on the node edit form.
  */
 function diff_form_alter($form_id, &$form) {
-  if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
+  if ($form['#base'] == 'node_form') {
     if (user_access('view revisions') && $form['nid']['#value'] > 0) {
       $form['preview_changes'] = array('#type' => 'button', '#value' => t('Preview changes'), '#weight' => 41);
       // Change the form render callback to display the new button
       $form['#theme'] = 'diff_node_form';
-      // Hijack the callback to handle showing of the diff if requested.
-      $form['#after_build'] = array('diff_node_form_add_changes');
+      // After build we add a button to preview changes.
+      if (is_array($form['#after_build']))
+        $form['#after_build'][] = 'diff_node_form_add_changes';
+      else
+        $form['#after_build'] = array('diff_node_form_add_changes');
     }
   }  
 }
@@ -482,10 +485,6 @@
     $changes .= _diff_table_body(node_load($form_values['nid']), $node);
     $changes .= '</table>';
     $form['#prefix'] = isset($form['#prefix']) ? $changes . $form['#prefix'] : $changes;
-    return $form;
   }
-  else {
-    // call original function from node module
-    return node_form_add_preview($form);
-  }
+  return $form;
 }
