Skip to content

Commit

Permalink
Attempt to address CI failure
Browse files Browse the repository at this point in the history
```
IE 11.0 (Windows 8.1) ERROR
133
  Expected identifier, string or number
134
  at @stimulus/core/dist/tests/index.js:2281:1
135

136
  SyntaxError: Expected identifier, string or number
137
     at ./packages/@stimulus/polyfills/index.js (@stimulus/core/dist/tests/index.js:2281:1)
```

```
IE 11.0 (Windows 8.1)  target disconnected callback when element is removed FAILED
125
	Promise rejected during "target disconnected callback when element is removed": Object doesn't support property or method 'remove'
126
	TypeError: Object doesn't support property or method 'remove'
127
	   at Anonymous function (eval code:191:25)
```
  • Loading branch information
seanpdoyle committed Apr 8, 2021
1 parent e6e1d12 commit 1b6e95e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/@stimulus/core/src/tests/modules/target_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default class TargetTests extends ControllerTestCase(TargetController) {
this.assert.equal(this.controller.inputTargetDisconnectedCallCountValue, 0)
this.assert.notOk(disconnectedInput.classList.contains("disconnected"), `expected "${disconnectedInput.className}" not to contain "disconnected"`)

disconnectedInput.remove()
disconnectedInput.parentElement?.removeChild(disconnectedInput)
await this.nextFrame

this.assert.equal(this.controller.inputTargetDisconnectedCallCountValue, 1)
Expand Down
2 changes: 1 addition & 1 deletion packages/@stimulus/polyfills/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (typeof SVGElement.prototype.contains != "function") {
// From https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected#polyfill
if (!("isConnected" in Node.prototype)) {
Object.defineProperty(Node.prototype, "isConnected", {
get() {
get: function() {
return (
!this.ownerDocument ||
!(
Expand Down

0 comments on commit 1b6e95e

Please sign in to comment.