Skip to content

Commit e49047f

Browse files
committed
Revert "fix: further improve user supplied prop fucntion detection"
This reverts commit 86bbb7f.
1 parent 86bbb7f commit e49047f

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

src/components/calendar/calendar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,14 @@ export const BCalendar = Vue.extend({
342342
},
343343
computedDateDisabledFn() {
344344
const { dateDisabledFn } = this
345-
return dateDisabledFn !== props.dateDisabledFn.default ? dateDisabledFn : () => false
345+
return dateDisabledFn.name !== props.dateDisabledFn.default.name
346+
? dateDisabledFn
347+
: () => false
346348
},
347349
// TODO: Change `dateInfoFn` to handle events and notes as well as classes
348350
computedDateInfoFn() {
349351
const { dateInfoFn } = this
350-
return dateInfoFn !== props.dateInfoFn.default ? dateInfoFn : () => ({})
352+
return dateInfoFn.name !== props.dateInfoFn.default.name ? dateInfoFn : () => ({})
351353
},
352354
calendarLocale() {
353355
// This locale enforces the gregorian calendar (for use in formatter functions)

src/components/form-file/form-file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export const BFormFile = /*#__PURE__*/ Vue.extend({
273273
},
274274
computedFileNameFormatter() {
275275
const { fileNameFormatter } = this
276-
return fileNameFormatter !== props.fileNameFormatter.default
276+
return fileNameFormatter.name !== props.fileNameFormatter.default.name
277277
? fileNameFormatter
278278
: this.defaultFileNameFormatter
279279
},

src/components/form-spinbutton/form-spinbutton.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
223223
},
224224
computedFormatter() {
225225
const { formatterFn } = this
226-
return formatterFn !== props.formatterFn.default ? formatterFn : this.defaultFormatter
226+
return formatterFn.name !== props.formatterFn.default.name
227+
? formatterFn
228+
: this.defaultFormatter
227229
},
228230
computedAttrs() {
229231
return {

src/components/form-tags/form-tags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({
535535
},
536536
validateTag(tag) {
537537
const { tagValidator } = this
538-
return tagValidator !== props.tagValidator.default ? tagValidator(tag) : true
538+
return tagValidator.name !== props.tagValidator.default.name ? tagValidator(tag) : true
539539
},
540540
getInput() {
541541
// Returns the input element reference (or null if not found)

src/components/table/helpers/mixin-filtering.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default {
9191
localFilterFn() {
9292
// Return `null` to signal to use internal filter function
9393
const { filterFunction } = this
94-
return filterFunction !== props.filterFunction.default ? filterFunction : null
94+
return filterFunction.name !== props.filterFunction.default.name ? filterFunction : null
9595
},
9696
// Returns the records in `localItems` that match the filter criteria
9797
// Returns the original `localItems` array if not sorting

src/mixins/form-text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default {
100100
return mathMax(toInteger(this.debounce, 0), 0)
101101
},
102102
hasFormatter() {
103-
return this.formatter !== props.formatter.default
103+
return this.formatter.name !== props.formatter.default.name
104104
}
105105
},
106106
watch: {

0 commit comments

Comments
 (0)