diff --git a/index.js b/index.js index 4d9dfd2..53b5cd6 100644 --- a/index.js +++ b/index.js @@ -217,7 +217,7 @@ var references = new WeakMap(); function getReference(key) { - return getValueInMap(key, references); + return getValueInMap(key, references) || null; } function getValue(self) { diff --git a/index.min.js b/index.min.js index 577e5b1..757c84c 100644 --- a/index.min.js +++ b/index.min.js @@ -23,4 +23,4 @@ * SOFTWARE. * */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TextEditor=t()}(this,(function(){"use strict";var e=function(e,t){return-1!==t.indexOf(e)},t=function(e){return Array.isArray(e)},r=function(e){return"function"==typeof e},n=function(e,t){return e&&u(t)&&e instanceof t},i=function(e){return o(e)&&0==e%1},o=function(e){return"number"==typeof e},c=function(e,t){return void 0===t&&(t=!0),"object"==typeof e&&(!t||n(e,Object))},u=function(e){return function(e){return void 0!==e}(e)&&!function(e){return null===e}(e)},a=function(e){return"string"==typeof e},s=function(e){return e.length},f=function(){for(var r=arguments.length,n=Array(r),i=0;i