Skip to content

Commit

Permalink
Merge pull request chuanxshi#75 from joshstrange/patch-1
Browse files Browse the repository at this point in the history
Added missing "["
  • Loading branch information
chuanxshi committed Jun 28, 2013
2 parents 8d44776 + 3349288 commit a4b127b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions general-patterns/shim-sniffing.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

// a reusable shim() function
function shim(o, prop, fn) {
var nbody = "function" + prop + "(){nativecode]}";
var nbody = "function" + prop + "(){[nativecode]}";
if (o.hasOwnProperty(prop) &&
o[prop].toString().replace(/\s/g, '') === nbody) {
// native!
Expand Down Expand Up @@ -73,4 +73,4 @@
// http://www.jspatterns.com/shim-sniffing/
</script>
</body>
</html>
</html>

0 comments on commit a4b127b

Please sign in to comment.