Skip to content

Commit 866f292

Browse files
committed
fixed dom parser error for ie
1 parent 7b8a3b4 commit 866f292

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

lib/swagger-request-spec.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/swagger-request-spec.coffee

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,16 @@ describe 'SwaggerRequest for version 1.2 spec', ->
6262
window.response?
6363

6464
runs ->
65+
data = window.response.data
6566
if window.DOMParser
6667
parser = new window.DOMParser()
6768
pet = parser.parseFromString(data, "text/xml")
68-
6969
else
7070
parser = new ActiveXObject("Microsoft.XMLDOM")
7171
parser.async = false
7272
pet = parser.loadXML(data)
7373

74-
parser = new DOMParser()
75-
data = window.response.data
76-
pet = parser.parseFromString( data, "text/xml" )
77-
#pet = window.response
7874
expect(pet).toBeDefined
79-
#expect(pet.id).toBe 1
8075

8176
it "fetches an object with plain text", ->
8277
params = {}

0 commit comments

Comments
 (0)