Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
taufik-nurrohman committed Oct 22, 2021
1 parent 29dfc69 commit 8e4a93e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
8 changes: 5 additions & 3 deletions .github/source/index.js.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ const KEY_TAB = 'Tab';

function TP(source, state = {}) {

if (!source) return;
const $ = this;

if (!source) {
return $;
}

// Already instantiated, skip!
if (source[name]) {
return source[name];
}

const $ = this;

// Return new instance if `TP` was called without the `new` operator
if (!isInstance($, TP)) {
return new TP(source, state);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Contribute
Release Notes
-------------

### 3.4.6
### 3.4.7

- Added CSS variables for easy integration with third-party applications.
- Fixed focus trap in read-only tag picker (#20).
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta content="#000" name="theme-color">
<meta content="width=device-width" name="viewport">
<meta content="Better tags input interaction with JavaScript." name="description">
<title>Tag Picker 3.4.6</title>
<title>Tag Picker 3.4.7</title>
<link href="index.min.css" rel="stylesheet">
<style>
* {
Expand Down Expand Up @@ -76,7 +76,7 @@
<body>
<p>Do you like this project? Please support my <a href="https://github.com/mecha-cms">Mecha CMS</a> project too. Thank you!</p>
<header>
<h1>Tag Picker 3.4.6</h1>
<h1>Tag Picker 3.4.7</h1>
<p>Tag Picker is a simple JavaScript application that aims to provide better experience for users in adding and removing comma-separated list of words.</p>
<hr>
</header>
Expand Down
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,13 @@
const KEY_TAB = 'Tab';

function TP(source, state = {}) {
if (!source) return; // Already instantiated, skip!
const $ = this;
if (!source) {
return $;
} // Already instantiated, skip!
if (source[name]) {
return source[name];
}
const $ = this; // Return new instance if `TP` was called without the `new` operator
} // Return new instance if `TP` was called without the `new` operator
if (!isInstance($, TP)) {
return new TP(source, state);
}
Expand Down Expand Up @@ -1150,6 +1152,6 @@
'min': 0,
'pattern': null
};
TP.version = '3.4.6';
TP.version = '3.4.7';
return TP;
});
2 changes: 1 addition & 1 deletion index.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ const KEY_TAB = 'Tab';

function TP(source, state = {}) {

if (!source) return;
const $ = this;

if (!source) {
return $;
}

// Already instantiated, skip!
if (source[name]) {
return source[name];
}

const $ = this;

// Return new instance if `TP` was called without the `new` operator
if (!isInstance($, TP)) {
return new TP(source, state);
Expand Down Expand Up @@ -793,6 +795,6 @@ TP.state = {
'pattern': null
};

TP.version = '3.4.6';
TP.version = '3.4.7';

export default TP;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
"pack": "pack --clean=false --from=.github/source --js-format=umd --js-name=TP --js-top='%(js.license)' --mjs=true --scss=true --to=."
},
"type": "module",
"version": "3.4.6"
"version": "3.4.7"
}

0 comments on commit 8e4a93e

Please sign in to comment.