rowanj/gitx — pull request #333 by muhqu (2014-05-19 06:52:35+00:00)
Title: Other Fix for #310

Fix for #310.
```
...
message = "TypeError: 'undefined' is not an object (evaluating 'ns[ n[i] ].rows.push')";
sourceURL = "file:///Applications/GitX.app/Contents/Resources/html/lib/diffHighlighter.js";
```

I turns out that the `inlinediff.diff()` method had issues caused by the use of Objects as HashMap. That's why @dgreensp added a fix using `Object.prototype.hasOwnProperty` (see #320). However this solution still fails when the key becomes `__proto__`, for some reason.

A simpler, saver and yet more efficient fix to the root issue is to just prefix the keys. e.g. `'"' + key`.