fix: code scanning alerts (#2750)
This commit is contained in:
@@ -3,7 +3,7 @@ import * as React from "react";
|
||||
import Frame from "./components/Frame";
|
||||
import Image from "./components/Image";
|
||||
|
||||
const URL_REGEX = new RegExp("^https://viewer.diagrams.net/.*(title=\\w+)?");
|
||||
const URL_REGEX = /^https:\/\/viewer\.diagrams\.net\/.*(title=\\w+)?/;
|
||||
|
||||
type Props = {|
|
||||
attrs: {|
|
||||
|
||||
@@ -3,13 +3,9 @@ import * as React from "react";
|
||||
import ImageZoom from "react-medium-image-zoom";
|
||||
import Frame from "./components/Frame";
|
||||
|
||||
const IFRAME_REGEX = new RegExp(
|
||||
"^https://(invis.io/.*)|(projects.invisionapp.com/share/.*)$"
|
||||
);
|
||||
const IFRAME_REGEX = /^https:\/\/(invis\.io\/.*)|(projects\.invisionapp\.com\/share\/.*)$/;
|
||||
|
||||
const IMAGE_REGEX = new RegExp(
|
||||
"^https://(opal.invisionapp.com/static-signed/live-embed/.*)$"
|
||||
);
|
||||
const IMAGE_REGEX = /^https:\/\/(opal\.invisionapp\.com\/static-signed\/live-embed\/.*)$/;
|
||||
|
||||
type Props = {|
|
||||
isSelected: boolean,
|
||||
|
||||
Reference in New Issue
Block a user