File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/brainbrowser/volume-viewer/volume-loaders Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 4848 STR : 9
4949 } ;
5050
51+ /* The following polyfill copied verbatim from MDN 2016-06-16 */
52+ if ( ! Array . prototype . find ) {
53+ Array . prototype . find = function ( predicate ) {
54+ if ( this === null ) {
55+ throw new TypeError ( 'Array.prototype.find called on null or undefined' ) ;
56+ }
57+ if ( typeof predicate !== 'function' ) {
58+ throw new TypeError ( 'predicate must be a function' ) ;
59+ }
60+ var list = Object ( this ) ;
61+ var length = list . length >>> 0 ;
62+ var thisArg = arguments [ 1 ] ;
63+ var value ;
64+
65+ for ( var i = 0 ; i < length ; i ++ ) {
66+ value = list [ i ] ;
67+ if ( predicate . call ( thisArg , value , i , list ) ) {
68+ return value ;
69+ }
70+ }
71+ return undefined ;
72+ } ;
73+ }
74+
5175 function defined ( x ) {
5276 return typeof x !== 'undefined' ;
5377 }
You can’t perform that action at this time.
0 commit comments