You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When build in release-optimised mode, the FDB Cursor no longer works, due to erroneous runtime type-checking.
The outcome is that a null or undefined value is returned from any Cursor Read operation. No exception is thrown, so it's difficult to debug. Everything works just fine in a normal development environment. To replicate the issue something like the Webpack Terser plugin must be used to optimise the javascript output.
Summary: code similar to the following occurs 3 times in FDBCursor.cs. In an optimised build, the name of the constructor will be different, causing these conditions to never be fulfilled.
if ( !this._keyOnly && this.constructor.name === "FDBCursorWithValue" ) {
Resolution: Since both FDBCursor and the derived class FDBCursorWithValue already implement a toString() function, a quick fix is as follows:
if ( !this._keyOnly && this.toString() === "[object IDBCursorWithValue]" ) {
The text was updated successfully, but these errors were encountered:
Thanks! Probably not a lot of people are minifying it, but your suggested fix sounds reasonable and all the tests still pass, so I just put it in v3.1.3.
When build in release-optimised mode, the FDB Cursor no longer works, due to erroneous runtime type-checking.
The outcome is that a null or undefined value is returned from any Cursor Read operation. No exception is thrown, so it's difficult to debug. Everything works just fine in a normal development environment. To replicate the issue something like the Webpack Terser plugin must be used to optimise the javascript output.
Summary: code similar to the following occurs 3 times in FDBCursor.cs. In an optimised build, the name of the constructor will be different, causing these conditions to never be fulfilled.
if ( !this._keyOnly && this.constructor.name === "FDBCursorWithValue" ) {
Resolution: Since both FDBCursor and the derived class FDBCursorWithValue already implement a toString() function, a quick fix is as follows:
if ( !this._keyOnly && this.toString() === "[object IDBCursorWithValue]" ) {
The text was updated successfully, but these errors were encountered: