Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
9c594a8a96
commit
5e73a212f4
124 changed files with 417 additions and 250 deletions
|
@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copy plaintext to user's clipboard
|
||||
* It will overwrite user's selection range
|
||||
|
@ -21,6 +20,8 @@ limitations under the License.
|
|||
* Tries to use new async clipboard API if available
|
||||
* @param text the plaintext to put in the user's clipboard
|
||||
*/
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
export async function copyPlaintext(text: string): Promise<boolean> {
|
||||
try {
|
||||
if (navigator && navigator.clipboard && navigator.clipboard.writeText) {
|
||||
|
@ -49,7 +50,7 @@ export async function copyPlaintext(text: string): Promise<boolean> {
|
|||
return successful;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("copyPlaintext failed", e);
|
||||
logger.error("copyPlaintext failed", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue