Permalink
Browse files

(GH1841) allows undefined

  • Loading branch information...
1 parent 310a612 commit 4c7e9ad7b44e1557d622a7a0e262372de28ed6cf @cormacmccarthy cormacmccarthy committed Aug 19, 2016
Showing with 6 additions and 6 deletions.
  1. +2 −1 .eslintrc
  2. +4 −5 js/pillbox.js
View
@@ -12,7 +12,8 @@
"indent": ["error", "tab"],
"yoda": 0,
"space-before-function-paren": 0,
- "requirejs/no-named-define": 2
+ "requirejs/no-named-define": 2,
+ "no-undefined": 0
},
"plugins": [
"requirejs"
View
@@ -1,4 +1,4 @@
-/* global someFunction jQuery:true */
+/* global jQuery:true */
/*
* Fuel UX Pillbox
@@ -12,7 +12,6 @@
// For more information on UMD visit:
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
-
(function umdWrapper (factory) {
if (typeof define === 'function' && define.amd) {
// if AMD loader is available, register as an anonymous module.
@@ -67,7 +66,7 @@
this.options = $.extend({}, $.fn.pillbox.defaults, options);
if (this.options.readonly === -1) {
- if (typeof this.$element.attr('data-readonly') !== 'undefined') {
+ if (this.$element.attr('data-readonly') !== undefined) {
this.readonly(true);
}
} else if (this.options.readonly) {
@@ -122,7 +121,7 @@
if (!$target.hasClass('pill')) {
$item = $target.parent();
- if (typeof this.$element.attr('data-readonly') === 'undefined') {
+ if (this.$element.attr('data-readonly') === undefined) {
if ($target.hasClass('glyphicon-close')) {
if (this.options.onRemove) {
this.options.onRemove(this.getItemData($item, {
@@ -709,7 +708,7 @@
}
});
- return (typeof methodReturn === 'undefined') ? $set : methodReturn;
+ return (methodReturn === undefined) ? $set : methodReturn;
};
$.fn.pillbox.defaults = {

0 comments on commit 4c7e9ad

Please sign in to comment.