Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit c46f150

Browse files
committed
lap25
1 parent f30a284 commit c46f150

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/hyper-operation/http.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def send(method, url, options, block)
187187
xhr.onreadystatechange = function() {
188188
if(xhr.readyState === XMLHttpRequest.DONE) {
189189
self.$class().$decr_active_requests();
190-
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) {
190+
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) {
191191
return #{succeed(`xhr.responseText`, `xhr.status`, `xhr`)};
192192
} else {
193193
return #{fail(`xhr`, `xhr.status`, `xhr.statusText`)};
@@ -271,9 +271,13 @@ def promise
271271

272272
@promise = Promise.new.tap { |promise|
273273
@handler = proc { |res|
274+
`console.log("in promise, res: ", res)`
275+
`console.log("res ok?", res['$ok?']())`
274276
if res.ok?
277+
`console.log('in success')`
275278
promise.resolve res
276279
else
280+
`console.log('in failure')`
277281
promise.reject res
278282
end
279283
}

lib/hyper-operation/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Hyperloop
22
class Operation
3-
VERSION = '1.0.0.lap24'
3+
VERSION = '1.0.0.lap25'
44
end
55
end

0 commit comments

Comments
 (0)