UNPKG

1.12 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3/*
4 * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
7 * the License. A copy of the License is located at
8 *
9 * http://aws.amazon.com/apache2.0/
10 *
11 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
13 * and limitations under the License.
14 */
15var core_1 = require("@aws-amplify/core");
16exports.default = (function (callback) {
17 if (core_1.JS.browserOrNode().isBrowser && window.location) {
18 var url = window.location.href;
19 callback({ url: url });
20 }
21 else if (core_1.JS.browserOrNode().isNode) {
22 // continue building on ssr
23 (function () { }); // noop
24 }
25 else {
26 throw new Error('Not supported');
27 }
28});
29//# sourceMappingURL=urlListener.js.map
\No newline at end of file