Skip to content

Commit 6d02ee3

Browse files
committed
small fixes
1 parent 466d754 commit 6d02ee3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tema2/r-promise/r-promise.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Prom = function() {
1616
result.then(
1717
nextPromise.resolve.bind(nextPromise),
1818
nextPromise.reject.bind(nextPromise));
19-
} else {
19+
} else {
2020
nextPromise.resolve(result);
2121
}
2222
} catch(e) {
@@ -53,15 +53,15 @@ var Prom = function() {
5353
return nextPromise;
5454
}
5555
self.resolve = function() {
56-
if (state !== undefined) {return;}
56+
if (state !== undefined) {return;}
5757
state = true;
5858
args = [].slice.call(arguments);
5959
onSucc.forEach(function(fn) {
6060
fn.apply({}, args);
6161
})
6262
}
6363
self.reject = function() {
64-
if (state !== undefined) {return;}
64+
if (state !== undefined) {return;}
6565
state = false;
6666
args = [].slice.call(arguments);
6767
onErr.forEach(function(fn) {
@@ -81,7 +81,7 @@ Prom.all = function(promises) {
8181
results[i] = r;
8282
if (!cont) {allPromise.resolve(results);}
8383
}, function(e) {
84-
allPromise.reject(e);
84+
allPromise.reject(e);
8585
});
8686
}, i);
8787
return allPromise;

tema4/view-1/code.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ var Producto = ProJS.Model.extend({
3030
// Vista
3131

3232
var VistaProducto = ProJS.View.extend({
33-
init: function() {
33+
init: function(options) {
3434
this._super(options);
35-
this.template = $('#producto-template');
35+
this.template = $('#template-producto').html();
3636
},
3737
render: function() {
3838
var attrs = this.model.toJSON();

0 commit comments

Comments
 (0)