Skip to content

Commit

Permalink
Fix regression in removeClasses function
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr committed Sep 4, 2018
1 parent 4ddf7fd commit e3f4957
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

##WIP

### Fixed

- Fix regression in `removeClasses` function

## 3.0.0 rc 13 (September 4, 2018)

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/js/util/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function removeClass(element, ...args) {
}

export function removeClasses(element, cls) {
attr(element, 'class', value => (value || '').replace(new RegExp(`\b${cls}\b`, 'g'), ''));
attr(element, 'class', value => (value || '').replace(new RegExp(`\\b${cls}\\b`, 'g'), ''));
}

export function replaceClass(element, ...args) {
Expand Down

0 comments on commit e3f4957

Please sign in to comment.