Skip to content

Commit 535131b

Browse files
authored
Merge pull request #74 from SpringRoll/release/2.0.3
Release/2.0.3
2 parents 9da3688 + 42313c2 commit 535131b

File tree

13 files changed

+117
-24
lines changed

13 files changed

+117
-24
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: build
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
7+
- 'dist/**'
8+
- 'typings/**'
9+
push:
10+
branches:
11+
- main
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
node-version: [8.x, 10.x, 12.x]
21+
22+
steps:
23+
- uses: actions/checkout@v1
24+
25+
- name: Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: npm install
31+
run: |
32+
npm ci
33+
env:
34+
CI: true
35+
36+
- name: build
37+
run: |
38+
npm run build
39+
env:
40+
CI: true
41+
42+
- name: test
43+
run: |
44+
npm run github-test
45+
env:
46+
CI: true
47+

.github/workflows/npm-deploy.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: npm-deploy
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 10
15+
registry-url: https://registry.npmjs.org/
16+
17+
- name: install
18+
run: |
19+
npm ci
20+
env:
21+
CI: true
22+
23+
- name: build
24+
run: |
25+
npm run build:full
26+
env:
27+
CI: true
28+
29+
- name: test
30+
run: npm run github-test
31+
env:
32+
CI: true
33+
34+
- name: publish
35+
run: npm publish
36+
env:
37+
CI: true
38+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

dist/SpringRoll-Container-umd.js

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

dist/SpringRoll-Container-umd.js.map

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

dist/index.js

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

dist/index.js.map

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

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "springroll-container",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "The iframe controller for interacting with SpringRoll applications",
55
"main": "./dist/index.js",
66
"license": "MIT",
@@ -65,7 +65,7 @@
6565
"test": "karma start karma.conf.js",
6666
"test:e2e": "npm run build:e2e && karma start karma.conf.e2e.js",
6767
"test:bs": "karma start karma.conf.bs.js",
68-
"travis-test": "./node_modules/.bin/karma start --single-run --browsers ChromeHeadless"
68+
"github-test": "./node_modules/.bin/karma start --single-run --browsers ChromeHeadless"
6969
},
7070
"readmeFilename": "README.md",
7171
"bugs": {

src/base-plugins/ButtonPlugin.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ export class ButtonPlugin extends BasePlugin {
7979
* @memberof ButtonPlugin
8080
*/
8181
changeMutedState(button, muted = false) {
82-
if (!(button instanceof HTMLElement)) {
82+
//most times button will be a Button class rather than an HTMLElement
83+
//But just in case the Button ui-element is not being used
84+
const htmlButton = button.button ? button.button : button;
85+
86+
if (!(htmlButton instanceof HTMLElement)) {
8387
return;
8488
}
8589

86-
button.classList.remove('unmuted');
87-
button.classList.remove('muted');
88-
button.classList.add(muted ? 'muted' : 'unmuted');
90+
htmlButton.classList.remove('unmuted');
91+
htmlButton.classList.remove('muted');
92+
htmlButton.classList.add(muted ? 'muted' : 'unmuted');
8993
}
9094
}

0 commit comments

Comments
 (0)