A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bootstrap-vue/bootstrap-vue/commit/cea6051efc901325d63c22f65381242bd6e774e7 below:

user supplied prop function detection (#6070) · bootstrap-vue/bootstrap-vue@cea6051 · GitHub

File tree Expand file treeCollapse file tree 6 files changed

+14

-48

lines changed

Filter options

Expand file treeCollapse file tree 6 files changed

+14

-48

lines changed Original file line number Diff line number Diff line change

@@ -43,7 +43,7 @@ import {

43 43

} from '../../utils/date'

44 44

import { attemptBlur, attemptFocus, requestAF } from '../../utils/dom'

45 45

import { stopEvent } from '../../utils/events'

46 -

import { isArray, isPlainObject, isString, isUndefined } from '../../utils/inspect'

46 +

import { isArray, isPlainObject, isString } from '../../utils/inspect'

47 47

import { isLocaleRTL } from '../../utils/locale'

48 48

import { mathMax } from '../../utils/math'

49 49

import { toInteger } from '../../utils/number'

@@ -342,20 +342,12 @@ export const BCalendar = Vue.extend({

342 342

},

343 343

computedDateDisabledFn() {

344 344

const { dateDisabledFn } = this

345 -

let result = null

346 -

try {

347 -

result = dateDisabledFn()

348 -

} catch {}

349 -

return isUndefined(result) ? () => false : dateDisabledFn

345 +

return dateDisabledFn.name !== 'default' ? dateDisabledFn : () => false

350 346

},

351 347

// TODO: Change `dateInfoFn` to handle events and notes as well as classes

352 348

computedDateInfoFn() {

353 349

const { dateInfoFn } = this

354 -

let result = null

355 -

try {

356 -

result = dateInfoFn()

357 -

} catch {}

358 -

return isUndefined(result) ? () => ({}) : dateInfoFn

350 +

return dateInfoFn.name !== 'default' ? dateInfoFn : () => ({})

359 351

},

360 352

calendarLocale() {

361 353

// This locale enforces the gregorian calendar (for use in formatter functions)

Original file line number Diff line number Diff line change

@@ -10,14 +10,7 @@ import { makePropsConfigurable } from '../../utils/config'

10 10

import { closest } from '../../utils/dom'

11 11

import { hasPromiseSupport } from '../../utils/env'

12 12

import { eventOn, eventOff, stopEvent } from '../../utils/events'

13 -

import {

14 -

isArray,

15 -

isFile,

16 -

isFunction,

17 -

isNull,

18 -

isUndefined,

19 -

isUndefinedOrNull

20 -

} from '../../utils/inspect'

13 +

import { isArray, isFile, isFunction, isNull, isUndefinedOrNull } from '../../utils/inspect'

21 14

import { File } from '../../utils/safe-types'

22 15

import { escapeRegExp } from '../../utils/string'

23 16

import { warn } from '../../utils/warn'

@@ -276,11 +269,9 @@ export const BFormFile = /*#__PURE__*/ Vue.extend({

276 269

},

277 270

computedFileNameFormatter() {

278 271

const { fileNameFormatter } = this

279 -

let result = null

280 -

try {

281 -

result = fileNameFormatter()

282 -

} catch {}

283 -

return isUndefined(result) ? this.defaultFileNameFormatter : fileNameFormatter

272 +

return fileNameFormatter.name !== 'default'

273 +

? fileNameFormatter

274 +

: this.defaultFileNameFormatter

284 275

},

285 276

clonedFiles() {

286 277

return cloneDeep(this.files)

Original file line number Diff line number Diff line change

@@ -13,7 +13,7 @@ import { arrayIncludes, concat } from '../../utils/array'

13 13

import { makePropsConfigurable } from '../../utils/config'

14 14

import { attemptBlur, attemptFocus } from '../../utils/dom'

15 15

import { eventOnOff, stopEvent } from '../../utils/events'

16 -

import { isNull, isUndefined } from '../../utils/inspect'

16 +

import { isNull } from '../../utils/inspect'

17 17

import { isLocaleRTL } from '../../utils/locale'

18 18

import { mathFloor, mathMax, mathPow, mathRound } from '../../utils/math'

19 19

import { toFloat, toInteger } from '../../utils/number'

@@ -223,11 +223,7 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({

223 223

},

224 224

computedFormatter() {

225 225

const { formatterFn } = this

226 -

let result = null

227 -

try {

228 -

result = formatterFn()

229 -

} catch {}

230 -

return isUndefined(result) ? this.defaultFormatter : formatterFn

226 +

return formatterFn.name !== 'default' ? formatterFn : this.defaultFormatter

231 227

},

232 228

computedAttrs() {

233 229

return {

Original file line number Diff line number Diff line change

@@ -21,7 +21,7 @@ import {

21 21

} from '../../utils/dom'

22 22

import { stopEvent } from '../../utils/events'

23 23

import { pick } from '../../utils/object'

24 -

import { isEvent, isNumber, isString, isUndefined } from '../../utils/inspect'

24 +

import { isEvent, isNumber, isString } from '../../utils/inspect'

25 25

import { escapeRegExp, toString, trim, trimLeft } from '../../utils/string'

26 26

import formControlMixin, { props as formControlProps } from '../../mixins/form-control'

27 27

import formSizeMixin, { props as formSizeProps } from '../../mixins/form-size'

@@ -508,11 +508,7 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({

508 508

},

509 509

validateTag(tag) {

510 510

const { tagValidator } = this

511 -

let result = null

512 -

try {

513 -

result = tagValidator()

514 -

} catch {}

515 -

return isUndefined(result) ? true : tagValidator(tag)

511 +

return tagValidator.name !== 'default' ? tagValidator(tag) : true

516 512

},

517 513

getInput() {

518 514

// Returns the input element reference (or null if not found)

Original file line number Diff line number Diff line change

@@ -5,7 +5,7 @@ import identity from '../../../utils/identity'

5 5

import looseEqual from '../../../utils/loose-equal'

6 6

import { concat } from '../../../utils/array'

7 7

import { makePropsConfigurable } from '../../../utils/config'

8 -

import { isFunction, isString, isRegExp, isUndefined } from '../../../utils/inspect'

8 +

import { isFunction, isString, isRegExp } from '../../../utils/inspect'

9 9

import { toInteger } from '../../../utils/number'

10 10

import { escapeRegExp } from '../../../utils/string'

11 11

import { warn } from '../../../utils/warn'

@@ -83,11 +83,7 @@ export default {

83 83

localFilterFn() {

84 84

// Return `null` to signal to use internal filter function

85 85

const { filterFunction } = this

86 -

let result = null

87 -

try {

88 -

result = filterFunction()

89 -

} catch {}

90 -

return isUndefined(result) ? null : filterFunction

86 +

return filterFunction.name !== 'default' ? filterFunction : null

91 87

},

92 88

// Returns the records in `localItems` that match the filter criteria

93 89

// Returns the original `localItems` array if not sorting

Original file line number Diff line number Diff line change

@@ -1,7 +1,6 @@

1 1

import { makePropsConfigurable } from '../utils/config'

2 2

import { attemptBlur, attemptFocus } from '../utils/dom'

3 3

import { stopEvent } from '../utils/events'

4 -

import { isUndefined } from '../utils/inspect'

5 4

import { mathMax } from '../utils/math'

6 5

import { toInteger, toFloat } from '../utils/number'

7 6

import { toString } from '../utils/string'

@@ -113,11 +112,7 @@ export default {

113 112

return mathMax(toInteger(this.debounce, 0), 0)

114 113

},

115 114

hasFormatter() {

116 -

let result = null

117 -

try {

118 -

result = this.formatter()

119 -

} catch {}

120 -

return !isUndefined(result)

115 +

return this.formatter.name !== 'default'

121 116

}

122 117

},

123 118

watch: {

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4