From 12b9ce133a70014992721717162218ff60269722 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Sat, 26 Mar 2022 16:20:07 +0100 Subject: [PATCH] refactor: replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 1e33c4d..7150916 100644 --- a/lib/index.js +++ b/lib/index.js @@ -127,7 +127,7 @@ export default (...plugins) => { const options = events.reduce((obj, value) => { obj[value] = (...args) => { this.$emit("input", this._pond ? this._pond.getFiles() : []); - this.$emit(value.substr(2), ...args); + this.$emit(value.slice(2), ...args); }; return obj; }, {});