Skip to content

Commit

Permalink
v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JB1905 committed Jun 21, 2019
1 parent 78ad151 commit 561d531
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 30 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### [CHANGELOG.md for v1 here](https://github.com/JB1905/menu-breaker.js/blob/v1/CHANGELOG.md)

## 2.0.2 (2019-06-21)
#### Change
- added full access to library methods for jQuery

## 2.0.1 (2019-03-21)
#### Bug Fix
- fixed CDN undefined bug
Expand Down
33 changes: 21 additions & 12 deletions lib/menu-breaker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/menu-breaker.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/menu-breaker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "menu-breaker",
"version": "2.0.1",
"version": "2.0.2",
"description": "Break HTML menu on resize",
"author": "Jakub Biesiada",
"license": "MIT",
Expand Down Expand Up @@ -37,7 +37,7 @@
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"babel-eslint": "^10.0.1",
"babel-eslint": "^10.0.2",
"babel-loader": "^8.0.6",
"eslint": "^5.16.0",
"eslint-config-prettier": "^5.0.0",
Expand All @@ -48,7 +48,7 @@
"jquery": "^3.4.1",
"lint-staged": "^8.2.1",
"prettier": "^1.18.2",
"webpack": "^4.34.0",
"webpack": "^4.35.0",
"webpack-cli": "^3.3.4"
},
"husky": {
Expand Down
18 changes: 13 additions & 5 deletions src/menu-breaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,18 @@ export default class MenuBreaker {

if (this.openCloseButton) {
this.openCloseButton.addEventListener('click', () => {
if (!this.isOpen) this.open();
else this.close();
if (!this.isOpen) {
this.open();
} else {
this.close();
}
});
}
}

if (this.isOpen) this.mobileMenu.classList.add(this.settings['open-class']);
if (this.isOpen) {
this.mobileMenu.classList.add(this.settings['open-class']);
}
}

desktop() {
Expand Down Expand Up @@ -133,8 +138,11 @@ export default class MenuBreaker {
const newSettings = {};

for (const property in defaultSettings) {
if (property in settings) newSettings[property] = settings[property];
else newSettings[property] = defaultSettings[property];
if (property in settings) {
newSettings[property] = settings[property];
} else {
newSettings[property] = defaultSettings[property];
}
}

return newSettings;
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1315,10 +1315,10 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==

babel-eslint@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed"
integrity sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==
babel-eslint@^10.0.2:
version "10.0.2"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.2.tgz#182d5ac204579ff0881684b040560fdcc1558456"
integrity sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.0.0"
Expand Down Expand Up @@ -6391,10 +6391,10 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0:
source-list-map "^2.0.0"
source-map "~0.6.1"

webpack@^4.34.0:
version "4.34.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.34.0.tgz#a4c30129482f7b4ece4c0842002dedf2b56fab58"
integrity sha512-ry2IQy1wJjOefLe1uJLzn5tG/DdIKzQqNlIAd2L84kcaADqNvQDTBlo8UcCNyDaT5FiaB+16jhAkb63YeG3H8Q==
webpack@^4.35.0:
version "4.35.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.35.0.tgz#ad3f0f8190876328806ccb7a36f3ce6e764b8378"
integrity sha512-M5hL3qpVvtr8d4YaJANbAQBc4uT01G33eDpl/psRTBCfjxFTihdhin1NtAKB1ruDwzeVdcsHHV3NX+QsAgOosw==
dependencies:
"@webassemblyjs/ast" "1.8.5"
"@webassemblyjs/helper-module-context" "1.8.5"
Expand Down

0 comments on commit 561d531

Please sign in to comment.