File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
packages/firestore/src/api Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1901,9 +1901,17 @@ function throwDocChangesMethodError(): never {
19011901 ) ;
19021902}
19031903
1904- Object . defineProperty ( QuerySnapshot . prototype . docChanges , 'length' , {
1905- get : ( ) => throwDocChangesMethodError ( )
1906- } ) ;
1904+ /**
1905+ * This is technically overwriting the `Function.prototype.length` property of
1906+ * `docChanges`. On IE11, the property is improperly defined with
1907+ * `{ configurable: false }` which causes this line to throw. Wrap in a
1908+ * try-catch to ensure that we still have a functional SDK.
1909+ */
1910+ try {
1911+ Object . defineProperty ( QuerySnapshot . prototype . docChanges , 'length' , {
1912+ get : ( ) => throwDocChangesMethodError ( )
1913+ } ) ;
1914+ } catch ( err ) { } // Ignore this failure intentionally
19071915
19081916if ( typeof Symbol !== 'undefined' ) {
19091917 Object . defineProperty ( QuerySnapshot . prototype . docChanges , Symbol . iterator , {
You can’t perform that action at this time.
0 commit comments