Permalink
Browse files

Sorry IE users, I left an Array.prototype.indexOf call in there

  • Loading branch information...
1 parent 367b978 commit 91ea29f9cd44b4235b337519b4f7bb6a42f1a797 Alex Young committed Apr 8, 2010
Showing with 10 additions and 1 deletion.
  1. +10 −1 riot.js
View
11 riot.js
@@ -127,8 +127,17 @@
requiredFiles: [],
+ indexOf: function(array, value) {
+ for (var i = 0; i < array.length; i++) {
+ if (array[i] === value) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
require: function() {
- if (this.requiredFiles.indexOf(arguments[0]) == -1) {
+ if (this.indexOf(this.requiredFiles, arguments[0]) == -1) {
this.requiredFiles.push(arguments[0]);
if (Riot.detectEnvironment() !== 'browser') {
this.load(arguments[0]);

0 comments on commit 91ea29f

Please sign in to comment.